[PC-BSD Commits] r2164 - websites/bsdstats.org/bsdstats/slib/db

svn at pcbsd.org svn at pcbsd.org
Mon Jun 23 20:43:40 PDT 2008


Author: fabry
Date: 2008-06-23 20:43:40 -0700 (Mon, 23 Jun 2008)
New Revision: 2164

Modified:
   websites/bsdstats.org/bsdstats/slib/db/pgsql.php
Log:
fixed a warning message.

Modified: websites/bsdstats.org/bsdstats/slib/db/pgsql.php
===================================================================
--- websites/bsdstats.org/bsdstats/slib/db/pgsql.php	2008-06-24 03:40:47 UTC (rev 2163)
+++ websites/bsdstats.org/bsdstats/slib/db/pgsql.php	2008-06-24 03:43:40 UTC (rev 2164)
@@ -60,16 +60,16 @@
 		parent::$instance =&$this;
 		$this->substitute['what']	= '';
 		$this->substitute['with']	= '';
-//		$this->default_result_type	= MYSQL_ASSOC;
-//		$this->default_result_type	= MYSQL_NUM;
-		$this->default_result_type	= MYSQL_BOTH;		//mysql default
+//		$this->default_result_type	= PGSQL_ASSOC;
+//		$this->default_result_type	= PGSQL_NUM;
+		$this->default_result_type	= PGSQL_BOTH;		//pgsql default
 	}
 	
 	function set_default_result_type($result_type){
 		if(
-			$result_type == MYSQL_ASSOC || 
-			$result_type == MYSQL_NUM || 
-			$result_type == MYSQL_BOTH
+			$result_type == PGSQL_ASSOC || 
+			$result_type == PGSQL_NUM || 
+			$result_type == PGSQL_BOTH
 		   ){
 			$this->default_result_type	= $result_type;
 		}
@@ -94,7 +94,7 @@
 				}
 			}
 //			if($this->timezone!=''){
-//				mysql_query('SET time_zone = "'.$this->timezone.'";', $this->link_id) or die('Error While Setting MySQL Timezone '.$this->timezone.' !<br />'.mysql_error() );
+//				pgsql_query('SET time_zone = "'.$this->timezone.'";', $this->link_id) or die('Error While Setting PgSQL Timezone '.$this->timezone.' !<br />'.pgsql_error() );
 //			}
 			$time2=$this->getmicrotime();
 			unset($this->server,$this->user,$this->password);
@@ -110,12 +110,12 @@
 	}
 	
 	function geterrdesc() {
-		$this->error=mysql_error();
+		$this->error=pgsql_error();
 		return $this->error;
   	}
 
   	function geterrno() {
-		$this->errno=mysql_errno();
+		$this->errno=0;
 		return $this->errno;
   	}
 
@@ -359,7 +359,7 @@
 		} else {
 			$return =$string;
 		}
-//		$return = mysql_real_escape_string($string);
+//		$return = pgsql_escape_string($string);
 		$time2=$this->getmicrotime();
 		$this->total_time += $time2-$time1;
 		return $return;
@@ -377,7 +377,7 @@
 			$this->errdesc=pg_result_error($this->link_id);
 			$this->errno=0;
 		} else {
-			//no connection, just gettin the last error from Mysql
+			//no connection, just gettin the last error from Pgsql
 			$this->errdesc=pg_last_error();
 			$this->errno=0;
 		}
@@ -418,7 +418,7 @@
 			if($this->die_error==1){
 				die();
 			}elseif($this->trigger_error==1){
-				trigger_error('MYSQL ERROR!!('.$this->errno.')'.$this->errdesc, E_USER_ERROR);
+				trigger_error('PGSQL ERROR!!('.$this->errno.')'.$this->errdesc, E_USER_ERROR);
 				$this->link_id = false;
 			}
 		}



More information about the Commits mailing list