Update of /cvsroot/openfirst/base/config
In directory sc8-pr-cvs1:/tmp/cvs-serv11273
Modified Files:
dbase.php
Log Message:
Add ofirst_dbnum_rows() function
Index: dbase.php
===================================================================
RCS file: /cvsroot/openfirst/base/config/dbase.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** dbase.php 23 Aug 2003 19:54:34 -0000 1.1
--- dbase.php 23 Aug 2003 20:10:12 -0000 1.2
***************
*** 142,144 ****
--- 142,161 ----
exit(0);
}
+
+ function ofirst_dbnum_rows($resource) {
+ global $dbasetype;
+ if($dbasetype == "mysql") {
+ if(function_exists("mysql_num_rows") == false) {
+ 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.");
+ }
+ return(mysql_num_rows($resource));
+ } elseif($dbasetype == "mssql") {
+ if(function_exists("mssql_num_rows") == false) {
+ 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.");
+ }
+ return(mssql_num_rows($resource));
+ }
+
+ exit(0);
+ }
?>
|