php,mysql_query()語句,提示記憶體溢出

來源:互聯網
上載者:User
關鍵字 mysql php phpmyadmin 記憶體溢出 timestamp
mysqlphpphpmyadmin記憶體溢出timestamp

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

  • 相關文章

    聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.