note 105480 modified in function.odbc-num-rows by danbrown
| From: | danbrown@php.net | Date: | Mon, 22 Aug 2011 14:03:21 +0000 |
| Subject: | note 105480 modified in function.odbc-num-rows by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-182645@lists.php.net to get a copy of this message | ||
Working Example of odbc_num_rows with MSSQL 2000.
This works ...
<?php
$connstr = "Driver={SQL Server};Server=SERVERNAME;Database=DBNAME;";
$conn = odbc_connect($connstr, "usr", "pwd");
$queryresult = odbc_exec($conn, "select * from table");
if ( odbc_num_rows($queryresult) > 0 ) {
// rows to process
} else {
// no rows to process
}
?>
--was--
Working Example of odbc_num_rows with MSSQL 2000.
This works ...
$connstr = "Driver={SQL Server};Server=SERVERNAME;Database=DBNAME;";
$conn = odbc_connect($connstr, "usr", "pwd");
$queryresult = odbc_exec($conn, "select * from table");
if ( odbc_num_rows($queryresult) > 0 ) {
// rows to process
} else {
// no rows to process
}
http://php.net/manual/en/function.odbc-num-rows.php