classes/database.php
/**
	 * Run a SQL query and return a PDO statement object
	 *
	 * @param string $sql query to run
	 * @param array $params the prepared query params
	 * @return object
	 */
Run a SQL query and return a PDO statement object
@param string $sql query to run
@param array $params the prepared query params
@return object
Run a SQL query and return a PDO statement object @param string $sql query to run @param array $params the prepared query params @return object
public function query($sql, $params = array())
	{
		$start = microtime(TRUE);
		$statement = $this->prepare($sql);
		$statement->execute($params);
		$this->queries[] = array($sql, (microtime(TRUE) - $start));
		return $statement;
	}
public function query ( $ sql , $ params = array ( ) ) { $ start = microtime ( TRUE ) ; $ statement = $ this -> prepare ( $ sql ) ; $ statement -> execute ( $ params ) ; $ this -> queries [ ] = array ( $ sql , ( microtime ( TRUE ) - $ start ) ) ; return $ statement ; }
Run a SQL query and return a PDO statement object
 @param string $sql query to run
 @param array $params the prepared query params
 @return object
Run a SQL query and return a PDO statement object @param string $sql query to run @param array $params the prepared query params @return object
// Prepare the query // Add the params and execute it // Record the query and time taken // Return the statement object