Update of /cvsroot/openfirst/base/config
In directory sc8-pr-cvs1:/tmp/cvs-serv13776
Modified Files:
dbase.php
Log Message:
Add ofirst_dberror() wrapper function.
Index: dbase.php
===================================================================
RCS file: /cvsroot/openfirst/base/config/dbase.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** dbase.php 23 Aug 2003 20:10:12 -0000 1.2
--- dbase.php 23 Aug 2003 20:28:59 -0000 1.3
***************
*** 100,103 ****
--- 100,123 ----
}
+ function ofirst_dberror($linkidentifier = "") {
+ global $dbasetype;
+ if($dbasetype == "mysql") {
+ if(function_exists("mysql_error") == 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.");
+ }
+ if($linkidentifier != "") {
+ return(mysql_error($linkidentifier));
+ } else {
+ return(mysql_error());
+ }
+ } elseif ($dbasetype == "mssql") {
+ if(function_exists("mssql_connect") == 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(0);
+ }
+ exit;
+ }
+
function ofirst_dbquery($string, $linkidentifier = "", $batchsize = "") {
global $dbasetype;
***************
*** 146,153 ****
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) {
--- 166,173 ----
global $dbasetype;
if($dbasetype == "mysql") {
! if(function_exists("ofirst_dbnum_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(ofirst_dbnum_rows($resource));
} elseif($dbasetype == "mssql") {
if(function_exists("mssql_num_rows") == false) {
|