Jump to content

wierd error using pg_fetch_array()


severndigital

Recommended Posts

if i use the following

 


$pull = pg_query($sql) or die("Error");

while($r = pg_fetch_array($pull){
    $result[] = $r;
}

 

everything works out, but i get an array of two values (one the NUM => the value and the other the ASSOC => the value.

 

when i change the pg_fetch_array() command to this

 

pg_fetch_array($pull,PGSQL_NUM)

 

i get the following error

Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 32 bytes) in /var/www/html/dpSandbox/calculator/class/database.class.php on line 56

 

i don't understand why. It doesn't matter the size of the database or the amount of data, it still will return this error.

 

any ideas? do i have something configured wrong??

 

Thanks in advance

-SD

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/173593-wierd-error-using-pg_fetch_array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.