odbc_num_rows always returnes -1
| From: | Jeff Bluemel | Date: | Sat, 19 Oct 2002 18:47:58 +0000 |
| Subject: | odbc_num_rows always returnes -1 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-120618@lists.php.net to get a copy of this message | ||
I've got the following code, and regardless if it finds something or not
odbc_num_rows returns -1 as the value? curious what I should I use to test
whether or not something was found? (the database I am connecting to is
Informix running on a different server)
$sql = odbc_exec($$ntslink,"SELECT lot_card_num_k AS pin, current_balance AS
balance, first_use_date AS first, lot_num_f AS batch, status_flag AS status,
zombie_date AS expired, sequence_number AS serial, zombie_method AS reason
FROM lot_card WHERE lot_card_num_k = '$pin';") or
die("Invalid ODBCQuery");
$numrows = odbc_num_rows($sql) if ($numrows <= 0 )