Re: Fw: [PHP] Re: [PHP-DB] Errors getting count(*) result
| From: | Ian Evans | Date: | Wed, 16 Aug 2000 19:18:09 +0000 |
| Subject: | Re: Fw: [PHP] Re: [PHP-DB] Errors getting count(*) result | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-2095@lists.php.net to get a copy of this message | ||
gstrein andreas wrote:
> $myResult=odbc_num_rows($result);
> echo $myResult;
Because the odbc mssql driver just returns a -1.
Right now, I just tested something else and it gave me the number I
need:
$res = odbc_exec($connect,"sp_spaceused amazoncd");
odbc_fetch_row($res);
$count = odbc_result($res, rows);
echo $count;
Not sure if it's the fastest way for odbc and MS SQL, but it worked.
--
Ian Evans