/**
  * Sets modifying query and performs it, IF NOT in dry run mode.
  * If in dry run mode, returns true
  * @access private
  *
  * @param  string  $sql
  * @return boolean
  */
 function _doQuery($sql)
 {
     if ($this->_dryRun) {
         return true;
     } else {
         $this->_db->SetQuery($sql);
         return $this->_db->query();
     }
 }
Ejemplo n.º 2
0
	function checkin( $oid = null ) {
		if ( ! array_key_exists( 'checked_out', get_class_vars( strtolower( get_class( $this ) ) ) ) ) {
			$this->_error	=	"WARNING: " . strtolower( get_class( $this ) ) . " does not support checkins.";
			return false;
		}
		$k				=	$this->_tbl_key;
		if ( $oid !== null ) {
			$this->$k	=	$oid;
		}
		$query			=	"UPDATE " . $this->_db->NameQuote( $this->_tbl )
						.	"\n SET checked_out = 0, checked_out_time = " . $this->_db->Quote( $this->_db->getNullDate() )
						.	"\n WHERE " . $this->_db->NameQuote( $this->_tbl_key ) . " = " . $this->_db->Quote( $this->$k )
						;
		$this->_db->setQuery( $query );
		return $this->_db->query();
	}