I'm in the process of porting some mysql to postgres, and I'm having trouble with warnings associated with fetch_array
code is something like this
while ($URow=pg_fetch_array($Result,$i++))
{
}
which works, except if the array has no elements, or $i runs off the end of the array, then the pg_fetch_array returns false (as desired), but also generated an unwanted error warning, eg:
-->Warning: Unable to jump to row 0 on PostgreSQL result index 5 in /home/ben/public_html/database.php on line 62
how do I prevent these warnings? Without having to test the number of rows in result.