portiny mysql to postgres, pg_fetch_array woes - Mailing list pgsql-novice

From ben palmer
Subject portiny mysql to postgres, pg_fetch_array woes
Date
Msg-id 200111072157.IAA19329@wisma.pacific.net.au
Whole thread Raw
Responses Re: portiny mysql to postgres, pg_fetch_array woes
List pgsql-novice
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.



pgsql-novice by date:

Previous
From: "Mark McArthey"
Date:
Subject: X manager?
Next
From: Helge Bahmann
Date:
Subject: Re: portiny mysql to postgres, pg_fetch_array woes