Update of /cvsroot/openfirst/base/config
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13070/config
Modified Files:
dbase.php
Log Message:
Bug #156: ofirst_dbnum_rows() will return -1 if the argument is not a resource.
Index: dbase.php
===================================================================
RCS file: /cvsroot/openfirst/base/config/dbase.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** dbase.php 13 Mar 2005 01:46:12 -0000 1.20
--- dbase.php 22 Mar 2005 22:08:26 -0000 1.21
***************
*** 221,224 ****
--- 221,225 ----
die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type.");
}
+ if (!is_resource($resource)) return -1;
return(mysql_num_rows($resource));
} elseif($dbasetype == "mssql") {
***************
*** 226,229 ****
--- 227,231 ----
die("Microsoft SQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable Microsoft SQL support, or choose another database type.");
}
+ if (!is_resource($resource)) return -1;
return(mssql_num_rows($resource));
} elseif($dbasetype == "odbc") {
***************
*** 232,235 ****
--- 234,238 ----
}
if($resource != "") {
+ if (!is_resource($resource)) return -1;
return(odbc_num_rows($resource));
} else {
|