I recently indexed a table and started getting the error message
/***** debug code – Query
pgsql/query (35.13s, 10000r): SELECT
Warning: Unable to jump to row 10000 on PostgreSQL result index 4 in /home/jsafro/library/database.lib on line 109
That error refers to:
for( $count_row = 0; $row = pg_fetch_array($result, $count_row, PGSQL_ASSOC); $count_row++ )
$data[] = $row;
=====================
I have tried variations on the 2nd argument for pg_fetch_array. For example (changes in bold):
SELECT * FROM products ORDER BY dept_id, cat_id, subcat_id, prod_name LIMIT [B]10
for( $count_row = 0; $row = pg_fetch_array($result, [B]NULL
$data[] = $row;
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 1105 bytes) in /home/jsafro/library/database.lib on line 109
The only thing that seems to work is dropping the 2nd (and 3rd) argument entirely. There is no difference between using a for loop and a while statement.
First, that doubles my query return size bc I am getting both numerically and text indexed data. Anyone know a way around this?
Second, anyone understand what is actually going wrong? Why did I start experiencing errors when I added the index?