Re: odbc_num_rows returns -1...any alternatives?
| From: | Andreas Karajannis | Date: | Thu, 31 Aug 2000 07:07:55 +0000 |
| Subject: | Re: odbc_num_rows returns -1...any alternatives? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-2509@lists.php.net to get a copy of this message | ||
As stated in the manual, odbc_num_rows() returns the number of affected
rows for DML statements. Only very few drivers are able to return the
number of rows in a select statement.
If you absolutely need the rowcount, you can either issue a "select
count(*)..." or fetch all available rows in advance.
-Andreas
--
Andreas Karajannis
GMD National Research Center for Information Technology
Schloss Birlinghoven, D-53754 Sankt Augustin
Phone +49 2241 142948