SELECT查询导致"致命错误内存不足"

时间:2015-06-03 04:51:35

标签: php mysql pdo out-of-memory

$chk = $dbh->prepare("SELECT * FROM af_rpta_faas_land_notapproved  AS t1 ,af_rpta_faas_land_notapproved_address  AS t2 ,af_rpta_faas_land_notapproved_approval  AS t3 ,af_rpta_faas_land_notapproved_boundaries  AS t4,af_rpta_faas_land_notapproved_ownerinfo  AS t5 ,af_rpta_faas_land_notapproved_references  AS t6 ,af_rpta_faas_land_notapproved_status  AS t7 ,af_rpta_faas_land_not_approved_aprroval_files  AS t8,af_rpta_faas_land_not_approved_valuation  AS t9 WHERE t1.pin = :pin AND t1.status = :active AND t2.pin = :pin AND t2.status = :active AND t3.pin = :pin AND t3.status = :active AND t4.pin = :pin AND t4.status = :active AND t5.pin = :pin AND t5.status = :active AND t6.pin = :pin AND t6.status = :active AND t7.pin = :pin AND t7.status = :active AND t8.pin = :pin AND t8.status = :active AND t9.pin = :pin AND t9.status = :active ");
$chk->bindValue(":pin", $pin, PDO::PARAM_STR);
$chk->bindParam(":active", $propertystatus, PDO::PARAM_STR);
if ($chk->execute())
    {
    echo $chk->rowCount();
    }

这是我的select语句,它非常简单。它从不同的表中选择数据和blob。但它是回报:

  

致命错误:内存不足(已分配1310720)(尝试分配10221840字节)

我已经阅读了一些文章,说我应该增加max_allowed_packet,但之后它没有用。任何建议将不胜感激。

更新

memory_limit=128M

中将memory_limit=256M更改为php.ini
[mysqldump]
quick
max_allowed_packet = 16M

[mysqldump]
quick
max_allowed_packet = 32M

在my.ini

0 个答案:

没有答案