/** * Runs a query into the driver and returns the result. * * @param string $sql SQL Query to execute * @param array|string $bind Data to bind into SELECT placeholders. * @return Database_Result */ public function query($sql = '', $binds = array()) { if ($sql == '') { return FALSE; } // Compile binds if needed if (isset($binds)) { $sql = $this->bind($sql, $binds); } // Set the last query $this->_lastQuery = $sql; // Fetch the result return $this->_driver->query($sql); }