[PHP-DB] odbc_fetch_row

2001-04-13 Thread Randall Barber
When I run a query, even if it is empty I still get a valid identifier for the result. How do I determine that there is nothing in the result, even though the result is valid (just empty)? I thought about odbc_fetch_row, but that moves the pointer forward and I don't want that; there may be va

RE: [PHP-DB] odbc_fetch_row

2001-04-13 Thread Francois Legare
April 13, 2001 3:30 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] odbc_fetch_row > > > When I run a query, even if it is empty I still get a valid > identifier for the result. > > How do I determine that there is nothing in the result, even > though the result is val

Re: [PHP-DB] odbc_fetch_row

2001-04-14 Thread joerg andreas
Try this: Ask for the length of the data returned by your SQL-Query. $fieldcontent = odbc_result($yourResultID,"YourField") if len($fieldcontent)=0 then... If Lenght of Datastring is Zero then the string is really empty. Happy eastern, Joerg Andreas -- "Rand

Re: [PHP-DB] odbc_fetch_row

2001-04-15 Thread Andrew Hill
Randall, Try something like: if (!(odbc_result($result_identifier)) echo "result is null"; Best regards, Andrew Andrew Hill . Director Technology Evangelism OpenLink Software . http://www.openlinksw.com Internet Data Integration Technology On 4/1

[PHP-DB] odbc_fetch_row failure

2001-11-09 Thread mike luce
Im trying to obtain a list of tables in a database. To do this, ive come up with the following code. $conn = odbc_connect("mydsn", "", ""); $tablelist = odbc_tables($conn); while(odbc_fetch_row($tablelist)) { $tbname = odbc_result($tablelist, 3); } Now the page just times out. I believ