Пример #1
0
 function execute($query, $use_slave = false)
 {
     // execute function: to use INSERT or UPDATE
     $cnx = $this->conn;
     if (!$cnx || $this->status_fatal) {
         return null;
     }
     $cur = @mysql_query($query, $cnx);
     if ($cur == FALSE) {
         $ErrorMessage = @mysql_last_error($cnx);
         $this->handleError($query, $ErrorMessage);
     } else {
         $this->Error = FALSE;
         $this->BadQuery = "";
         $this->NumRows = mysql_affected_rows();
         return;
     }
     @mysql_free_result($cur);
 }
Пример #2
0
 /**
  * get last error
  * @access public
  */
 function get_db_error()
 {
     return mysql_last_error();
 }