select fails to return certain rows from table

From: "Andy Dunlop" <andy(at)horizon(dot)co(dot)za>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: select fails to return certain rows from table
Date: 2002-10-25 14:48:29
Message-ID: 000801c27c35$9709ada0$7001a8c0@horizon.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I am selecting rows from a table using "select * from gla where glacode = $glresult[0]"
$glresult[0] comes from a previous query result.
For the first three rows in the table I get the error "Warning: Unable to jump to row 0 on PostgreSQL result index 4 in /home/httpd/infocus/html/iris/ben_glrep.php on line 65

The other rows in the table are found ok.
The glacode field is a varchar
The first three values of glacode are "010", "020", "050"
The rest of the values of glacode all begin with something other than "0" e.g. "110", "115", "120" etc.
So it appears that the leading "0" is a problem.
I have also tried this in phpPgAdmin and I get the same results without the error message.
Your help is gratefully appreciated
_________________________________
Andy Dunlop
mailto:andy(at)horizon(dot)co(dot)za

Office: +27 (21) 975 2440
Cell: +27 (82) 770 8749
_________________________________

Browse pgsql-bugs by date

  From Date Subject
Next Message drac 2002-10-25 21:56:00 socket problem under BeOS
Previous Message Tom Lane 2002-10-24 21:12:13 Re: set search_path documentation missing from development docs