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 Quote 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); Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.