The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

I've selected all the records from a database for display, and am trying to form a loop so that it will display all records, but it's just displaying the same record 15 times (there are 15 rows in the database). I can't see where i've gone wrong! My code is below, if anyone can help I would be most grateful!

It's getting late now so I haven't got the time or the available brain cells to check it out tonight, but i'll be sure to try it tomorrow (and i'm sure it will work, so thank you in advance for your help!).

What with the festive season, essays, socialising, and problems with my web server I haven't been able to implement the code until now, and i'm experiencing a problem I don't know how to resolve!

It prints all the records as I hoped but it gives me an error:

Warning: Unable to jump to row 14 on PostgreSQL result index 2 in /path/to/my/file.inc on line 46

Line 46 is the start of the loop:

while($data = pg_Fetch_array($result, $i)) {

The rest of the loop is as you gave me.

Any ideas? There are only 14 records currently in the database, and there will only be 31 in total once i've added all the information, so if it would be easier to tell it only to search for 31 records then that would be fine.