php,mysql_query()语句,提示内存溢出
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了php,mysql_query()语句,提示内存溢出,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1377字,纯文字阅读大概需要2分钟。
内容图文
![php,mysql_query()语句,提示内存溢出](/upload/InfoBanner/zyjiaocheng/246/fe9228f4b8124edba0fc3fb13ef18e12.jpg)
php后台接口,将两个表进行联合查询,使用union语句,在phpmyadmin中执行没有问题,
但是用postman进行测试时,提示内存溢出,有没有不使用ini_set的方法,解决这个问题,我试着unset了
几个变量,还是不行
$recommend = 1;
$check_status = 2; $art_act_reslut = mysql_query( "SELECT * FROM ( SELECT publish_time, article_id as id, user_id as user_brand_id, article_text as text, article_thumbs as thumds_person_num, sort_weight, '' as title, article_comment_number as article_comment_number FROM article WHERE recommend = '$recommend' and check_status = '$check_status' and publish_time > '$timestamp' UNION SELECT publish_time, activity_id as id, brand_id as user_beand_id, activity_content as text, join_persons as thumds_person_num, sort_weight, activity_title as title, '' as article_comment_number FROM activity WHERE recommend = '$recommend' and check_status = '$check_status' and publish_time > '$timestamp') stain ORDER BY stain.publish_time DESC, stain.sort_weight DESC"); unset($recommend); unset($check_status); //赋值到cards for($i=0;$i<20;$i++) { $cards_arr = array(); $art_act_reslut_value = mysql_fetch_assoc($art_act_reslut); //给相应的参数赋值 $id = $art_act_reslut_value["id"]; $user_brand_id = $art_act_reslut_value["user_brand_id"]; $text = $art_act_reslut_value["text"]; $thumds_person_num = $art_act_reslut_value["thumds_person_num"]; $article_comment_nummber = $art_act_reslut_value["article_comment_number"]; $publish_time = $art_act_reslut_value["publish_time"]; $title = $art_act_reslut_value["title"]; $sort_weight = $art_act_reslut_value["sort_weight"]; unset($art_act_reslut_value);
这是错误信息
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20 bytes) in /home/fgang/local/apache/htdocs/bimu/interface/get_home_recommand.php on line 102
内容总结
以上是互联网集市为您收集整理的php,mysql_query()语句,提示内存溢出全部内容,希望文章能够帮你解决php,mysql_query()语句,提示内存溢出所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。