classes/database.php
/**
	 * Execute an SQL statement and return the number of affected rows
	 *
	 * @param string $sql query to run
	 * @return int
	 */
Execute an SQL statement and return the number of affected rows
@param string $sql query to run
@return int
Execute an SQL statement and return the number of affected rows @param string $sql query to run @return int
public function exec($sql)
	{
		if($this->type == 'mysql')
		{
			$sql = str_replace('"', '`', $sql);
		}
		$start = microtime(TRUE);
		$result = $this->connection->exec($sql);
		$this->queries[] = array($sql, (microtime(TRUE) - $start));
	}
public function exec ( $ sql ) { if ( $ this -> type == 'mysql' ) { $ sql = str_replace ( '"' , '`' , $ sql ) ; } $ start = microtime ( TRUE ) ; $ result = $ this -> connection -> exec ( $ sql ) ; $ this -> queries [ ] = array ( $ sql , ( microtime ( TRUE ) - $ start ) ) ; }
Execute an SQL statement and return the number of affected rows
 @param string $sql query to run
 @return int
Execute an SQL statement and return the number of affected rows @param string $sql query to run @return int
// MySQL uses an incorrect SQL identifier character (the `tick) // Get the database connection and prepare the statement // Record the query and time taken