lib/db/cortex.php
public function touch($key) {
		if (isset($this->fieldConf[$key])
			&& isset($this->fieldConf[$key]['type'])) {
			$type = $this->fieldConf[$key]['type'];
			$date = ($this->dbsType=='sql' && preg_match('/mssql|sybase|dblib|odbc|sqlsrv/',
				$this->db->driver())) ? 'Ymd' : 'Y-m-d';
			if ($type == Schema::DT_DATETIME || $type == Schema::DT_TIMESTAMP)
				$this->set($key,date($date.' H:i:s'));
			elseif ($type == Schema::DT_DATE)
				$this->set($key,date($date));
			elseif ($type == Schema::DT_INT4)
				$this->set($key,time());
		}
	}
public function touch($key) {
		if (isset($this->fieldConf[$key])
			&& isset($this->fieldConf[$key]['type'])) {
			$type = $this->fieldConf[$key]['type'];
			$date = ($this->dbsType=='sql' && preg_match('/mssql|sybase|dblib|odbc|sqlsrv/',
				$this->db->driver())) ? 'Ymd' : 'Y-m-d';
			if ($type == Schema::DT_DATETIME || $type == Schema::DT_TIMESTAMP)
				$this->set($key,date($date.' H:i:s'));
			elseif ($type == Schema::DT_DATE)
				$this->set($key,date($date));
			elseif ($type == Schema::DT_INT4)
				$this->set($key,time());
		}
	}
public function touch ( $ key ) { if ( isset ( $ this -> fieldConf [ $ key ] ) && isset ( $ this -> fieldConf [ $ key ] [ 'type' ] ) ) { $ type = $ this -> fieldConf [ $ key ] [ 'type' ] ; $ date = ( $ this -> dbsType == 'sql' && preg_match ( '/mssql|sybase|dblib|odbc|sqlsrv/' , $ this -> db -> driver ( ) ) ) ? 'Ymd' : 'Y-m-d' ; if ( $ type == Schema :: DT_DATETIME || $ type == Schema :: DT_TIMESTAMP ) $ this -> set ( $ key , date ( $ date . ' H:i:s' ) ) ; elseif ( $ type == Schema :: DT_DATE ) $ this -> set ( $ key , date ( $ date ) ) ; elseif ( $ type == Schema :: DT_INT4 ) $ this -> set ( $ key , time ( ) ) ; } }
update a given date or time field with the current time
@param string $key
update a given date or time field with the current time