Query
Handles a query based on the <SQL.method>.
Summary
| Query | Handles a query based on the <SQL.method>. |
| Variables | |
| $query | Holds the current query. |
| Functions | |
| __construct | Creates a query based on the <SQL.interface>. |
| fetchColumn | Fetches a column of the current row. |
| fetch | Returns the current row as an array. |
| fetchObject | Returns the current row as an object. |
| fetchAll | Returns an array of every result. |
| grab | Grabs all of the given column out of the full result of a query. |
| handle | Handles exceptions thrown by failed queries. |
__construct
| public function __construct( | $sql, | |||
| $query, | ||||
| $params | = | array(), | ||
| $throw_exceptions | = | false | ) |
Creates a query based on the <SQL.interface>.
Parameters
| $sql | SQL instance. |
| $query | Query to execute. |
| $params | An associative array of parameters used in the query. |
| $throw_exceptions | Throw exceptions on error? |