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
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
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
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
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