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); }
/** * get last error * @access public */ function get_db_error() { return mysql_last_error(); }