severndigital Posted September 8, 2009 Share Posted September 8, 2009 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 More sharing options...
rhodesa Posted September 8, 2009 Share Posted September 8, 2009 use either this: $r = pg_fetch_array($pull, NULL, PGSQL_NUM); or $r = pg_fetch_row($pull); Link to comment https://forums.phpfreaks.com/topic/173593-wierd-error-using-pg_fetch_array/#findComment-915050 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.