Heim > Backend-Entwicklung > PHP-Tutorial > php,mysql_query()语句,提示内存溢出

php,mysql_query()语句,提示内存溢出

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Freigeben: 2016-06-02 11:27:34
Original
1387 Leute haben es durchsucht

mysqlphpphpmyadmin内存溢出timestamp

php后台接口,将两个表进行联合查询,使用union语句,在phpmyadmin中执行没有问题,
但是用postman进行测试时,提示内存溢出,有没有不使用ini_set的方法,解决这个问题,我试着unset了
几个变量,还是不行
$recommend = 1;

<code> $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</code>
Nach dem Login kopieren

这是错误信息
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

phpmyadmin运行正常

Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage