[phpMP-CVS] CVS: phpMP/includes/db mysql.php,1.1,1.2 postgresql.php,1.1,1.2
Status: Pre-Alpha
Brought to you by:
heimidal
From: Adam A. <ra...@us...> - 2003-10-15 03:53:13
|
Update of /cvsroot/phpmp/phpMP/includes/db In directory sc8-pr-cvs1:/tmp/cvs-serv32004/includes/db Modified Files: mysql.php postgresql.php Log Message: Error handling.. Index: mysql.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/db/mysql.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** mysql.php 15 Oct 2003 03:37:24 -0000 1.1 --- mysql.php 15 Oct 2003 03:53:09 -0000 1.2 *************** *** 31,39 **** class sql_db { ! var $db_connection_id; ! var $db_query; ! var $db_query_result = 0; ! var $db_query_count = 0; ! var $db_rowset = array(); // Open database connection, select database --- 31,48 ---- class sql_db { ! var $db_connection_id; // Database connection resource id ! var $db_query; // SQL ! var $db_query_result = 0; // Result resource id ! var $db_query_count = 0; // Total query count ! var $db_rowset = array(); // Selected rows ! var $lang; // Reference to big language variable ! var $error_handler; // Reference to error handling class ! ! // Class constructor ! function sql_db($lang, $error_handler) ! { ! $this->lang = $lang; ! $this->error_handler = $error_handler; ! } // Open database connection, select database *************** *** 54,58 **** if( !is_null($error_handling) ) { ! // to db error handler (ERROR_FLAG, $this->sql_error($this->db_connection_id), $this->sql_errno($this->db_connection_id)); } else --- 63,67 ---- if( !is_null($error_handling) ) { ! $this->error_handler->db_error($lang['CONNECTION_NOT_ESTABLISHED'], $this->sql_error($this->db_connection_id), $this->sql_errno($this->db_connection_id)); } else *************** *** 69,73 **** if( !is_null($error_handling) ) { ! // to db error handler (ERROR_FLAG, $this->sql_error($this->db_connection_id), $this->sql_errno($this->db_connection_id)); } else --- 78,82 ---- if( !is_null($error_handling) ) { ! $this->error_handler->db_error($lang['DATABASE_NOT_SELECTED'], $this->sql_error($this->db_connection_id), $this->sql_errno($this->db_connection_id)); } else *************** *** 123,127 **** if( !is_null($sql_explain) ) { ! // to db error handler (ERROR_FLAG, $this->sql_error($this->db_connection_id), $this->sql_errno($this->db_connection_id), $sql_explain, $line, $file); } else --- 132,136 ---- if( !is_null($sql_explain) ) { ! $this->error_handler->sql_error($sql_explain, $line, $file, $this->sql_error($this->db_connection_id), $this->sql_errno($this->db_connection_id)); } else Index: postgresql.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/db/postgresql.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** postgresql.php 15 Oct 2003 03:37:24 -0000 1.1 --- postgresql.php 15 Oct 2003 03:53:09 -0000 1.2 *************** *** 32,40 **** class sql_db { ! var $db_connection_id; ! var $db_query; ! var $db_query_result = 0; ! var $db_query_count = 0; ! var $db_rowset = array(); // Open database connection, select database --- 32,42 ---- class sql_db { ! var $db_connection_id; // Database connection resource id ! var $db_query; // SQL ! var $db_query_result = 0; // Result resource id ! var $db_query_count = 0; // Total query count ! var $db_rowset = array(); // Selected rows ! var $lang; // Reference to big language variable ! var $error_handler; // Reference to error handling class // Open database connection, select database *************** *** 54,58 **** if( !is_null($error_handling) ) { ! // to db error handler (ERROR_FLAG, $this->sql_error($this->db_connection_id), NULL); } else --- 56,60 ---- if( !is_null($error_handling) ) { ! $this->error_handler->db_error($lang['CONNECTION_NOT_ESTABLISHED'], $this->sql_error($this->db_connection_id), $this->sql_errno($this->db_connection_id)); } else *************** *** 107,111 **** if( !is_null($sql_explain) ) { ! // to db error handler (ERROR_FLAG, $this->sql_error($this->db_connection_id), $this->sql_errno($this->db_connection_id), $sql_explain, $line, $file); } else --- 109,113 ---- if( !is_null($sql_explain) ) { ! $this->error_handler->sql_error($sql_explain, $line, $file, $this->sql_error($this->db_connection_id), $this->sql_errno($this->db_connection_id)); } else |