Miscellaneous cleanup
This commit is contained in:
parent
b3d3c3f35d
commit
65b10c52c9
@ -1037,7 +1037,7 @@ class Query_Builder implements Query_Builder_Interface {
|
|||||||
*
|
*
|
||||||
* @param string $table
|
* @param string $table
|
||||||
* @param mixed $data
|
* @param mixed $data
|
||||||
* @return mixed
|
* @return PDOStatement
|
||||||
*/
|
*/
|
||||||
public function insert($table, $data=array())
|
public function insert($table, $data=array())
|
||||||
{
|
{
|
||||||
@ -1079,7 +1079,7 @@ class Query_Builder implements Query_Builder_Interface {
|
|||||||
*
|
*
|
||||||
* @param string $table
|
* @param string $table
|
||||||
* @param mixed $data
|
* @param mixed $data
|
||||||
* @return mixed
|
* @return PDOStatement
|
||||||
*/
|
*/
|
||||||
public function update($table, $data=array())
|
public function update($table, $data=array())
|
||||||
{
|
{
|
||||||
@ -1099,7 +1099,7 @@ class Query_Builder implements Query_Builder_Interface {
|
|||||||
*
|
*
|
||||||
* @param string $table
|
* @param string $table
|
||||||
* @param mixed $where
|
* @param mixed $where
|
||||||
* @return mixed
|
* @return PDOStatement
|
||||||
*/
|
*/
|
||||||
public function delete($table, $where='')
|
public function delete($table, $where='')
|
||||||
{
|
{
|
||||||
@ -1253,7 +1253,7 @@ class Query_Builder implements Query_Builder_Interface {
|
|||||||
* @param string $type
|
* @param string $type
|
||||||
* @param string $table
|
* @param string $table
|
||||||
* @param string $sql
|
* @param string $sql
|
||||||
* @param mixed $vals
|
* @param array|null $vals
|
||||||
* @return PDOStatement
|
* @return PDOStatement
|
||||||
*/
|
*/
|
||||||
protected function _run($type, $table, $sql=NULL, $vals=NULL)
|
protected function _run($type, $table, $sql=NULL, $vals=NULL)
|
||||||
@ -1388,33 +1388,27 @@ class Query_Builder implements Query_Builder_Interface {
|
|||||||
// Get the base clause for the query
|
// Get the base clause for the query
|
||||||
$sql = $this->_compile_type($type, $this->db->quote_table($table));
|
$sql = $this->_compile_type($type, $this->db->quote_table($table));
|
||||||
|
|
||||||
// Set the where clause
|
$clauses = array(
|
||||||
if ( ! empty($this->query_map))
|
'query_map',
|
||||||
|
'group_string',
|
||||||
|
'order_string',
|
||||||
|
'having_map',
|
||||||
|
);
|
||||||
|
|
||||||
|
// Set each type of subclause
|
||||||
|
foreach($clauses as $clause)
|
||||||
{
|
{
|
||||||
foreach($this->query_map as $q)
|
$param = $this->$clause;
|
||||||
|
if (is_array($param))
|
||||||
|
{
|
||||||
|
foreach($param as $q)
|
||||||
{
|
{
|
||||||
$sql .= $q['conjunction'] . $q['string'];
|
$sql .= $q['conjunction'] . $q['string'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
// Set the group_by clause
|
|
||||||
if ( ! empty($this->group_string))
|
|
||||||
{
|
{
|
||||||
$sql .= $this->group_string;
|
$sql .= $param;
|
||||||
}
|
|
||||||
|
|
||||||
// Set the order_by clause
|
|
||||||
if ( ! empty($this->order_string))
|
|
||||||
{
|
|
||||||
$sql .= $this->order_string;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the having clause
|
|
||||||
if ( ! empty($this->having_map))
|
|
||||||
{
|
|
||||||
foreach($this->having_map as $h)
|
|
||||||
{
|
|
||||||
$sql .= $h['conjunction'] . $h['string'];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -409,6 +409,17 @@ interface Query_Builder_Interface {
|
|||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates and executes a batch insertion query
|
||||||
|
*
|
||||||
|
* @param string $table
|
||||||
|
* @param array $data
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function insert_batch($table, $data=array());
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an update clause, and executes it
|
* Creates an update clause, and executes it
|
||||||
*
|
*
|
||||||
|
13
common.php
13
common.php
@ -165,19 +165,6 @@ function Query($params = '')
|
|||||||
// Create the dsn for the database to connect to
|
// Create the dsn for the database to connect to
|
||||||
if ($dbtype === 'firebird') $dsn = "{$params->host}:{$params->file}";
|
if ($dbtype === 'firebird') $dsn = "{$params->host}:{$params->file}";
|
||||||
elseif ($dbtype === 'sqlite') $dsn = $params->file;
|
elseif ($dbtype === 'sqlite') $dsn = $params->file;
|
||||||
elseif ($dbtype === 'pdo_firebird')
|
|
||||||
{
|
|
||||||
$dbtype = 'firebird';
|
|
||||||
|
|
||||||
if ( ! empty($params->port))
|
|
||||||
{
|
|
||||||
$dsn = "{$dbtype}:dbname={$params->host}/{$params->port}:{$params->file}";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$dsn = "{$dbtype}:dbname={$params->host}:{$params->file}";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( ! empty($params->conn_db))
|
if ( ! empty($params->conn_db))
|
||||||
|
@ -1,279 +0,0 @@
|
|||||||
<!DOCTYPE html><html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Query » \iDB_SQL</title>
|
|
||||||
<meta name="author" content="Mike van Riel">
|
|
||||||
<meta name="description" content="">
|
|
||||||
<link href="../css/template.css" rel="stylesheet" media="all">
|
|
||||||
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script><script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script><script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script><script src="../js/bootstrap.js" type="text/javascript"></script><script src="../js/template.js" type="text/javascript"></script><script src="../js/prettify/prettify.min.js" type="text/javascript"></script><link rel="shortcut icon" href="../img/favicon.ico">
|
|
||||||
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
|
|
||||||
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
|
|
||||||
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="navbar navbar-fixed-top">
|
|
||||||
<div class="navbar-inner"><div class="container">
|
|
||||||
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a><a class="brand" href="../index.html">Query</a><div class="nav-collapse"><ul class="nav">
|
|
||||||
<li class="dropdown">
|
|
||||||
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
|
|
||||||
API Documentation <b class="caret"></b></a><ul class="dropdown-menu">
|
|
||||||
<li><a>Packages</a></li>
|
|
||||||
<li><a href="../packages/Query.html"><i class="icon-folder-open"></i> Query</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li class="dropdown" id="charts-menu">
|
|
||||||
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
|
|
||||||
Charts <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="../graph_class.html"><i class="icon-list-alt"></i> Class hierarchy diagram</a></li></ul>
|
|
||||||
</li>
|
|
||||||
<li class="dropdown" id="reports-menu">
|
|
||||||
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
|
|
||||||
Reports <b class="caret"></b></a><ul class="dropdown-menu">
|
|
||||||
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors
|
|
||||||
<span class="label label-info">0</span></a></li>
|
|
||||||
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers
|
|
||||||
<ul></ul></a></li>
|
|
||||||
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements
|
|
||||||
<span class="label label-info">0</span></a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul></div>
|
|
||||||
</div></div>
|
|
||||||
<div class="go_to_top"><a href="#___" style="color: inherit">Back to top <i class="icon-upload icon-white"></i></a></div>
|
|
||||||
</div>
|
|
||||||
<div id="___" class="container">
|
|
||||||
<noscript><div class="alert alert-warning">
|
|
||||||
Javascript is disabled; several features are only available
|
|
||||||
if Javascript is enabled.
|
|
||||||
</div></noscript>
|
|
||||||
<div class="row">
|
|
||||||
<div class="span4">
|
|
||||||
<div class="btn-toolbar">
|
|
||||||
<div class="btn-group visibility" data-toggle="buttons-checkbox">
|
|
||||||
<button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button>
|
|
||||||
</div>
|
|
||||||
<div class="btn-group view pull-right" data-toggle="buttons-radio">
|
|
||||||
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<ul class="side-nav nav nav-list"><li class="nav-header">
|
|
||||||
<i title="Methods" class="icon-custom icon-method"></i> Methods
|
|
||||||
<ul>
|
|
||||||
<li class="method public "><a href="#method_column_list" title="column_list() :: Get information about the columns in the
|
|
||||||
specified table"><span class="description">Get information about the columns in the
|
|
||||||
specified table</span><pre>column_list()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_db_list" title="db_list() :: Returns sql to list other databases"><span class="description">Returns sql to list other databases</span><pre>db_list()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_explain" title="explain() :: Modify the query to get the query plan"><span class="description">Modify the query to get the query plan</span><pre>explain()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_function_list" title="function_list() :: Return sql to list functions"><span class="description">Return sql to list functions</span><pre>function_list()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_limit" title="limit() :: Get database specific sql for limit clause"><span class="description">Get database specific sql for limit clause</span><pre>limit()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_procedure_list" title="procedure_list() :: Return sql to list stored procedures"><span class="description">Return sql to list stored procedures</span><pre>procedure_list()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_random" title="random() :: Get the sql for random ordering"><span class="description">Get the sql for random ordering</span><pre>random()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_sequence_list" title="sequence_list() :: Return sql to list sequences"><span class="description">Return sql to list sequences</span><pre>sequence_list()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_system_table_list" title="system_table_list() :: Returns sql to list system tables"><span class="description">Returns sql to list system tables</span><pre>system_table_list()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_table_list" title="table_list() :: Returns sql to list tables"><span class="description">Returns sql to list tables</span><pre>table_list()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_trigger_list" title="trigger_list() :: Returns sql to list triggers"><span class="description">Returns sql to list triggers</span><pre>trigger_list()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_type_list" title="type_list() :: Return sql to list database field types"><span class="description">Return sql to list database field types</span><pre>type_list()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_view_list" title="view_list() :: Returns sql to list views"><span class="description">Returns sql to list views</span><pre>view_list()</pre></a></li>
|
|
||||||
</ul>
|
|
||||||
</li></ul>
|
|
||||||
</div>
|
|
||||||
<div class="span8">
|
|
||||||
<a id="\iDB_SQL"></a><ul class="breadcrumb">
|
|
||||||
<li>
|
|
||||||
<a href="../index.html"><i title="Classes" class="icon-custom icon-class"></i></a><span class="divider">\</span>
|
|
||||||
</li>
|
|
||||||
<li class="active">
|
|
||||||
<span class="divider">\</span><a href="../classes/iDB_SQL.html">iDB_SQL</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<div class="element interface">
|
|
||||||
<p class="short_description">parent for database manipulation subclasses</p>
|
|
||||||
<div class="details">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered">
|
|
||||||
<tr>
|
|
||||||
<th>package</th>
|
|
||||||
<td><a href="../packages/Query.Query.html">Query</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>subpackage</th>
|
|
||||||
<td>Query</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<h3>
|
|
||||||
<i title="Methods" class="icon-custom icon-method"></i> Methods</h3>
|
|
||||||
<a id="method_column_list"></a><div class="element clickable method public method_column_list" data-toggle="collapse" data-target=".method_column_list .collapse" title="public">
|
|
||||||
<h2>Get information about the columns in the
|
|
||||||
specified table</h2>
|
|
||||||
<pre>column_list(string $table) : string</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$table</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>string</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_db_list"></a><div class="element clickable method public method_db_list" data-toggle="collapse" data-target=".method_db_list .collapse" title="public">
|
|
||||||
<h2>Returns sql to list other databases</h2>
|
|
||||||
<pre>db_list() : string</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>string</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_explain"></a><div class="element clickable method public method_explain" data-toggle="collapse" data-target=".method_explain .collapse" title="public">
|
|
||||||
<h2>Modify the query to get the query plan</h2>
|
|
||||||
<pre>explain(string $sql) : string</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$sql</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>string</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_function_list"></a><div class="element clickable method public method_function_list" data-toggle="collapse" data-target=".method_function_list .collapse" title="public">
|
|
||||||
<h2>Return sql to list functions</h2>
|
|
||||||
<pre>function_list() : NULL</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>NULL</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_limit"></a><div class="element clickable method public method_limit" data-toggle="collapse" data-target=".method_limit .collapse" title="public">
|
|
||||||
<h2>Get database specific sql for limit clause</h2>
|
|
||||||
<pre>limit(string $sql, int $limit, int $offset<code> = FALSE</code>) : string</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>abstract</th>
|
|
||||||
<td></td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$sql</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$limit</h4>
|
|
||||||
<code>int</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$offset</h4>
|
|
||||||
<code>int</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>string</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_procedure_list"></a><div class="element clickable method public method_procedure_list" data-toggle="collapse" data-target=".method_procedure_list .collapse" title="public">
|
|
||||||
<h2>Return sql to list stored procedures</h2>
|
|
||||||
<pre>procedure_list() : string</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>string</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_random"></a><div class="element clickable method public method_random" data-toggle="collapse" data-target=".method_random .collapse" title="public">
|
|
||||||
<h2>Get the sql for random ordering</h2>
|
|
||||||
<pre>random() : string</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>abstract</th>
|
|
||||||
<td></td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>string</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_sequence_list"></a><div class="element clickable method public method_sequence_list" data-toggle="collapse" data-target=".method_sequence_list .collapse" title="public">
|
|
||||||
<h2>Return sql to list sequences</h2>
|
|
||||||
<pre>sequence_list() : string</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>string</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_system_table_list"></a><div class="element clickable method public method_system_table_list" data-toggle="collapse" data-target=".method_system_table_list .collapse" title="public">
|
|
||||||
<h2>Returns sql to list system tables</h2>
|
|
||||||
<pre>system_table_list() : string</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>string</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_table_list"></a><div class="element clickable method public method_table_list" data-toggle="collapse" data-target=".method_table_list .collapse" title="public">
|
|
||||||
<h2>Returns sql to list tables</h2>
|
|
||||||
<pre>table_list() : string</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>string</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_trigger_list"></a><div class="element clickable method public method_trigger_list" data-toggle="collapse" data-target=".method_trigger_list .collapse" title="public">
|
|
||||||
<h2>Returns sql to list triggers</h2>
|
|
||||||
<pre>trigger_list() : string</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>string</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_type_list"></a><div class="element clickable method public method_type_list" data-toggle="collapse" data-target=".method_type_list .collapse" title="public">
|
|
||||||
<h2>Return sql to list database field types</h2>
|
|
||||||
<pre>type_list() : mixed</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>mixed</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_view_list"></a><div class="element clickable method public method_view_list" data-toggle="collapse" data-target=".method_view_list .collapse" title="public">
|
|
||||||
<h2>Returns sql to list views</h2>
|
|
||||||
<pre>view_list() : string</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>string</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row"><footer class="span12">
|
|
||||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.2.0
|
|
||||||
</a> and<br>
|
|
||||||
generated on 2014-03-26T20:50:45-04:00.<br></footer></div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,998 +0,0 @@
|
|||||||
<!DOCTYPE html><html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Query » \iQuery_Builder</title>
|
|
||||||
<meta name="author" content="Mike van Riel">
|
|
||||||
<meta name="description" content="">
|
|
||||||
<link href="../css/template.css" rel="stylesheet" media="all">
|
|
||||||
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script><script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script><script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script><script src="../js/bootstrap.js" type="text/javascript"></script><script src="../js/template.js" type="text/javascript"></script><script src="../js/prettify/prettify.min.js" type="text/javascript"></script><link rel="shortcut icon" href="../img/favicon.ico">
|
|
||||||
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
|
|
||||||
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
|
|
||||||
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="navbar navbar-fixed-top">
|
|
||||||
<div class="navbar-inner"><div class="container">
|
|
||||||
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a><a class="brand" href="../index.html">Query</a><div class="nav-collapse"><ul class="nav">
|
|
||||||
<li class="dropdown">
|
|
||||||
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
|
|
||||||
API Documentation <b class="caret"></b></a><ul class="dropdown-menu">
|
|
||||||
<li><a>Packages</a></li>
|
|
||||||
<li><a href="../packages/Query.html"><i class="icon-folder-open"></i> Query</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li class="dropdown" id="charts-menu">
|
|
||||||
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
|
|
||||||
Charts <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="../graph_class.html"><i class="icon-list-alt"></i> Class hierarchy diagram</a></li></ul>
|
|
||||||
</li>
|
|
||||||
<li class="dropdown" id="reports-menu">
|
|
||||||
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
|
|
||||||
Reports <b class="caret"></b></a><ul class="dropdown-menu">
|
|
||||||
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors
|
|
||||||
<span class="label label-info">0</span></a></li>
|
|
||||||
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers
|
|
||||||
<ul></ul></a></li>
|
|
||||||
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements
|
|
||||||
<span class="label label-info">0</span></a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul></div>
|
|
||||||
</div></div>
|
|
||||||
<div class="go_to_top"><a href="#___" style="color: inherit">Back to top <i class="icon-upload icon-white"></i></a></div>
|
|
||||||
</div>
|
|
||||||
<div id="___" class="container">
|
|
||||||
<noscript><div class="alert alert-warning">
|
|
||||||
Javascript is disabled; several features are only available
|
|
||||||
if Javascript is enabled.
|
|
||||||
</div></noscript>
|
|
||||||
<div class="row">
|
|
||||||
<div class="span4">
|
|
||||||
<div class="btn-toolbar">
|
|
||||||
<div class="btn-group visibility" data-toggle="buttons-checkbox">
|
|
||||||
<button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button>
|
|
||||||
</div>
|
|
||||||
<div class="btn-group view pull-right" data-toggle="buttons-radio">
|
|
||||||
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<ul class="side-nav nav nav-list"><li class="nav-header">
|
|
||||||
<i title="Methods" class="icon-custom icon-method"></i> Methods
|
|
||||||
<ul>
|
|
||||||
<li class="method public "><a href="#method_count_all" title="count_all() :: Retreive the number of rows in the selected table"><span class="description">Retreive the number of rows in the selected table</span><pre>count_all()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_count_all_results" title="count_all_results() :: Retrieve the number of results for the generated query - used
|
|
||||||
in place of the get() method"><span class="description">Retrieve the number of results for the generated query - used
|
|
||||||
in place of the get() method</span><pre>count_all_results()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_delete" title="delete() :: Deletes data from a table"><span class="description">Deletes data from a table</span><pre>delete()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_distinct" title="distinct() :: Adds the 'distinct' keyword to a query"><span class="description">Adds the 'distinct' keyword to a query</span><pre>distinct()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_explain" title="explain() :: Shows the query plan for the query"><span class="description">Shows the query plan for the query</span><pre>explain()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_from" title="from() :: Specify the database table to select from"><span class="description">Specify the database table to select from</span><pre>from()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_get" title="get() :: Select and retrieve all records from the current table, and/or
|
|
||||||
execute current compiled query"><span class="description">Select and retrieve all records from the current table, and/or
|
|
||||||
execute current compiled query</span><pre>get()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_get_compiled_delete" title="get_compiled_delete() :: Returns the generated 'delete' sql query"><span class="description">Returns the generated 'delete' sql query</span><pre>get_compiled_delete()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_get_compiled_insert" title="get_compiled_insert() :: Returns the generated 'insert' sql query"><span class="description">Returns the generated 'insert' sql query</span><pre>get_compiled_insert()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_get_compiled_select" title="get_compiled_select() :: Returns the generated 'select' sql query"><span class="description">Returns the generated 'select' sql query</span><pre>get_compiled_select()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_get_compiled_update" title="get_compiled_update() :: Returns the generated 'update' sql query"><span class="description">Returns the generated 'update' sql query</span><pre>get_compiled_update()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_get_where" title="get_where() :: Convience method for get() with a where clause"><span class="description">Convience method for get() with a where clause</span><pre>get_where()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_group_by" title="group_by() :: Group the results by the selected field(s)"><span class="description">Group the results by the selected field(s)</span><pre>group_by()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_group_end" title="group_end() :: Ends a query group"><span class="description">Ends a query group</span><pre>group_end()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_group_start" title="group_start() :: Adds a paren to the current query for query grouping"><span class="description">Adds a paren to the current query for query grouping</span><pre>group_start()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_having" title="having() :: Generates a 'Having' clause"><span class="description">Generates a 'Having' clause</span><pre>having()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_insert" title="insert() :: Creates an insert clause, and executes it"><span class="description">Creates an insert clause, and executes it</span><pre>insert()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_join" title="join() :: Creates a join phrase in a compiled query"><span class="description">Creates a join phrase in a compiled query</span><pre>join()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_like" title="like() :: Creates a Like clause in the sql statement"><span class="description">Creates a Like clause in the sql statement</span><pre>like()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_limit" title="limit() :: Set a limit on the current sql statement"><span class="description">Set a limit on the current sql statement</span><pre>limit()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_not_like" title="not_like() :: Generates a NOT LIKE clause"><span class="description">Generates a NOT LIKE clause</span><pre>not_like()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_or_group_start" title="or_group_start() :: Adds a paren to the current query for query grouping,
|
|
||||||
prefixed with 'OR'"><span class="description">Adds a paren to the current query for query grouping,
|
|
||||||
prefixed with 'OR'</span><pre>or_group_start()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_or_having" title="or_having() :: Generates a 'Having' clause prefixed with 'OR'"><span class="description">Generates a 'Having' clause prefixed with 'OR'</span><pre>or_having()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_or_like" title="or_like() :: Generates an OR Like clause"><span class="description">Generates an OR Like clause</span><pre>or_like()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_or_not_group_start" title="or_not_group_start() :: Adds a paren to the current query for query grouping,
|
|
||||||
prefixed with 'OR NOT'"><span class="description">Adds a paren to the current query for query grouping,
|
|
||||||
prefixed with 'OR NOT'</span><pre>or_not_group_start()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_or_not_like" title="or_not_like() :: Generates a OR NOT LIKE clause"><span class="description">Generates a OR NOT LIKE clause</span><pre>or_not_like()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_or_where" title='or_where() :: Where clause prefixed with "OR"'><span class="description">Where clause prefixed with "OR"</span><pre>or_where()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_or_where_in" title='or_where_in() :: Where in statement prefixed with "or"'><span class="description">Where in statement prefixed with "or"</span><pre>or_where_in()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_or_where_not_in" title="or_where_not_in() :: OR WHERE NOT IN (FOO) clause"><span class="description">OR WHERE NOT IN (FOO) clause</span><pre>or_where_not_in()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_order_by" title="order_by() :: Order the results by the selected field(s)"><span class="description">Order the results by the selected field(s)</span><pre>order_by()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_reset_query" title="reset_query() :: Clear out the class variables, so the next query can be run"><span class="description">Clear out the class variables, so the next query can be run</span><pre>reset_query()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_select" title="select() :: Specifies rows to select in a query"><span class="description">Specifies rows to select in a query</span><pre>select()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_select_avg" title="select_avg() :: Selects the average value of a field from a query"><span class="description">Selects the average value of a field from a query</span><pre>select_avg()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_select_max" title="select_max() :: Selects the maximum value of a field from a query"><span class="description">Selects the maximum value of a field from a query</span><pre>select_max()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_select_min" title="select_min() :: Selects the minimum value of a field from a query"><span class="description">Selects the minimum value of a field from a query</span><pre>select_min()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_select_sum" title="select_sum() :: Selects the sum of a field from a query"><span class="description">Selects the sum of a field from a query</span><pre>select_sum()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_set" title="set() :: Sets values for inserts / updates / deletes"><span class="description">Sets values for inserts / updates / deletes</span><pre>set()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_update" title="update() :: Creates an update clause, and executes it"><span class="description">Creates an update clause, and executes it</span><pre>update()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_where" title="where() :: Specify condition(s) in the where clause of a query
|
|
||||||
Note: this function works with key / value, or a
|
|
||||||
passed array with key / value pairs"><span class="description">Specify condition(s) in the where clause of a query
|
|
||||||
Note: this function works with key / value, or a
|
|
||||||
passed array with key / value pairs</span><pre>where()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_where_in" title="where_in() :: Where clause with 'IN' statement"><span class="description">Where clause with 'IN' statement</span><pre>where_in()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_where_not_in" title="where_not_in() :: WHERE NOT IN (FOO) clause"><span class="description">WHERE NOT IN (FOO) clause</span><pre>where_not_in()</pre></a></li>
|
|
||||||
</ul>
|
|
||||||
</li></ul>
|
|
||||||
</div>
|
|
||||||
<div class="span8">
|
|
||||||
<a id="\iQuery_Builder"></a><ul class="breadcrumb">
|
|
||||||
<li>
|
|
||||||
<a href="../index.html"><i title="Classes" class="icon-custom icon-class"></i></a><span class="divider">\</span>
|
|
||||||
</li>
|
|
||||||
<li class="active">
|
|
||||||
<span class="divider">\</span><a href="../classes/iQuery_Builder.html">iQuery_Builder</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<div class="element interface">
|
|
||||||
<p class="short_description">Interface defining the Query Builder class</p>
|
|
||||||
<div class="details">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered">
|
|
||||||
<tr>
|
|
||||||
<th>package</th>
|
|
||||||
<td><a href="../packages/Query.Query.html">Query</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>subpackage</th>
|
|
||||||
<td>Query</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<h3>
|
|
||||||
<i title="Methods" class="icon-custom icon-method"></i> Methods</h3>
|
|
||||||
<a id="method_count_all"></a><div class="element clickable method public method_count_all" data-toggle="collapse" data-target=".method_count_all .collapse" title="public">
|
|
||||||
<h2>Retreive the number of rows in the selected table</h2>
|
|
||||||
<pre>count_all(string $table) : int</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$table</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>int</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_count_all_results"></a><div class="element clickable method public method_count_all_results" data-toggle="collapse" data-target=".method_count_all_results .collapse" title="public">
|
|
||||||
<h2>Retrieve the number of results for the generated query - used
|
|
||||||
in place of the get() method</h2>
|
|
||||||
<pre>count_all_results(string $table<code> = ''</code>) : int</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$table</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>int</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_delete"></a><div class="element clickable method public method_delete" data-toggle="collapse" data-target=".method_delete .collapse" title="public">
|
|
||||||
<h2>Deletes data from a table</h2>
|
|
||||||
<pre>delete(string $table, mixed $where<code> = ''</code>) : mixed</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$table</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$where</h4>
|
|
||||||
<code>mixed</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>mixed</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_distinct"></a><div class="element clickable method public method_distinct" data-toggle="collapse" data-target=".method_distinct .collapse" title="public">
|
|
||||||
<h2>Adds the 'distinct' keyword to a query</h2>
|
|
||||||
<pre>distinct() : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_explain"></a><div class="element clickable method public method_explain" data-toggle="collapse" data-target=".method_explain .collapse" title="public">
|
|
||||||
<h2>Shows the query plan for the query</h2>
|
|
||||||
<pre>explain() : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_from"></a><div class="element clickable method public method_from" data-toggle="collapse" data-target=".method_from .collapse" title="public">
|
|
||||||
<h2>Specify the database table to select from</h2>
|
|
||||||
<pre>from(string $tblname) : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$tblname</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_get"></a><div class="element clickable method public method_get" data-toggle="collapse" data-target=".method_get .collapse" title="public">
|
|
||||||
<h2>Select and retrieve all records from the current table, and/or
|
|
||||||
execute current compiled query</h2>
|
|
||||||
<pre>get(mixed $table<code> = ''</code>, int $limit<code> = FALSE</code>, int $offset<code> = FALSE</code>) : object</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument"><h4>$table</h4></div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$limit</h4>
|
|
||||||
<code>int</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$offset</h4>
|
|
||||||
<code>int</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>object</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_get_compiled_delete"></a><div class="element clickable method public method_get_compiled_delete" data-toggle="collapse" data-target=".method_get_compiled_delete .collapse" title="public">
|
|
||||||
<h2>Returns the generated 'delete' sql query</h2>
|
|
||||||
<pre>get_compiled_delete(string $table<code> = ""</code>, bool $reset<code> = TRUE</code>) : string</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$table</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$reset</h4>
|
|
||||||
<code>bool</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>string</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_get_compiled_insert"></a><div class="element clickable method public method_get_compiled_insert" data-toggle="collapse" data-target=".method_get_compiled_insert .collapse" title="public">
|
|
||||||
<h2>Returns the generated 'insert' sql query</h2>
|
|
||||||
<pre>get_compiled_insert(string $table, bool $reset<code> = TRUE</code>) : string</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$table</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$reset</h4>
|
|
||||||
<code>bool</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>string</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_get_compiled_select"></a><div class="element clickable method public method_get_compiled_select" data-toggle="collapse" data-target=".method_get_compiled_select .collapse" title="public">
|
|
||||||
<h2>Returns the generated 'select' sql query</h2>
|
|
||||||
<pre>get_compiled_select(string $table<code> = ''</code>, bool $reset<code> = TRUE</code>) : string</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$table</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$reset</h4>
|
|
||||||
<code>bool</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>string</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_get_compiled_update"></a><div class="element clickable method public method_get_compiled_update" data-toggle="collapse" data-target=".method_get_compiled_update .collapse" title="public">
|
|
||||||
<h2>Returns the generated 'update' sql query</h2>
|
|
||||||
<pre>get_compiled_update(string $table<code> = ''</code>, bool $reset<code> = TRUE</code>) : string</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$table</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$reset</h4>
|
|
||||||
<code>bool</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>string</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_get_where"></a><div class="element clickable method public method_get_where" data-toggle="collapse" data-target=".method_get_where .collapse" title="public">
|
|
||||||
<h2>Convience method for get() with a where clause</h2>
|
|
||||||
<pre>get_where(string $table, array $where<code> = array()</code>, int $limit<code> = FALSE</code>, int $offset<code> = FALSE</code>) : object</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$table</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$where</h4>
|
|
||||||
<code>array</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$limit</h4>
|
|
||||||
<code>int</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$offset</h4>
|
|
||||||
<code>int</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>object</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_group_by"></a><div class="element clickable method public method_group_by" data-toggle="collapse" data-target=".method_group_by .collapse" title="public">
|
|
||||||
<h2>Group the results by the selected field(s)</h2>
|
|
||||||
<pre>group_by(mixed $field) : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$field</h4>
|
|
||||||
<code>mixed</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_group_end"></a><div class="element clickable method public method_group_end" data-toggle="collapse" data-target=".method_group_end .collapse" title="public">
|
|
||||||
<h2>Ends a query group</h2>
|
|
||||||
<pre>group_end() : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_group_start"></a><div class="element clickable method public method_group_start" data-toggle="collapse" data-target=".method_group_start .collapse" title="public">
|
|
||||||
<h2>Adds a paren to the current query for query grouping</h2>
|
|
||||||
<pre>group_start() : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_having"></a><div class="element clickable method public method_having" data-toggle="collapse" data-target=".method_having .collapse" title="public">
|
|
||||||
<h2>Generates a 'Having' clause</h2>
|
|
||||||
<pre>having(mixed $key, mixed $val<code> = array()</code>) : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$key</h4>
|
|
||||||
<code>mixed</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$val</h4>
|
|
||||||
<code>mixed</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_insert"></a><div class="element clickable method public method_insert" data-toggle="collapse" data-target=".method_insert .collapse" title="public">
|
|
||||||
<h2>Creates an insert clause, and executes it</h2>
|
|
||||||
<pre>insert(string $table, mixed $data<code> = array()</code>) : mixed</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$table</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$data</h4>
|
|
||||||
<code>mixed</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>mixed</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_join"></a><div class="element clickable method public method_join" data-toggle="collapse" data-target=".method_join .collapse" title="public">
|
|
||||||
<h2>Creates a join phrase in a compiled query</h2>
|
|
||||||
<pre>join(string $table, string $condition, string $type<code> = ''</code>) : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$table</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$condition</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$type</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_like"></a><div class="element clickable method public method_like" data-toggle="collapse" data-target=".method_like .collapse" title="public">
|
|
||||||
<h2>Creates a Like clause in the sql statement</h2>
|
|
||||||
<pre>like(string $field, mixed $val, string $pos<code> = 'both'</code>) : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$field</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$val</h4>
|
|
||||||
<code>mixed</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$pos</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_limit"></a><div class="element clickable method public method_limit" data-toggle="collapse" data-target=".method_limit .collapse" title="public">
|
|
||||||
<h2>Set a limit on the current sql statement</h2>
|
|
||||||
<pre>limit(int $limit, int $offset<code> = FALSE</code>) : string</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$limit</h4>
|
|
||||||
<code>int</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$offset</h4>
|
|
||||||
<code>int</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>string</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_not_like"></a><div class="element clickable method public method_not_like" data-toggle="collapse" data-target=".method_not_like .collapse" title="public">
|
|
||||||
<h2>Generates a NOT LIKE clause</h2>
|
|
||||||
<pre>not_like(string $field, mixed $val, string $pos<code> = 'both'</code>) : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$field</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$val</h4>
|
|
||||||
<code>mixed</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$pos</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_or_group_start"></a><div class="element clickable method public method_or_group_start" data-toggle="collapse" data-target=".method_or_group_start .collapse" title="public">
|
|
||||||
<h2>Adds a paren to the current query for query grouping,
|
|
||||||
prefixed with 'OR'</h2>
|
|
||||||
<pre>or_group_start() : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_or_having"></a><div class="element clickable method public method_or_having" data-toggle="collapse" data-target=".method_or_having .collapse" title="public">
|
|
||||||
<h2>Generates a 'Having' clause prefixed with 'OR'</h2>
|
|
||||||
<pre>or_having(mixed $key, mixed $val<code> = array()</code>) : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$key</h4>
|
|
||||||
<code>mixed</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$val</h4>
|
|
||||||
<code>mixed</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_or_like"></a><div class="element clickable method public method_or_like" data-toggle="collapse" data-target=".method_or_like .collapse" title="public">
|
|
||||||
<h2>Generates an OR Like clause</h2>
|
|
||||||
<pre>or_like(string $field, mixed $val, string $pos<code> = 'both'</code>) : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$field</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$val</h4>
|
|
||||||
<code>mixed</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$pos</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_or_not_group_start"></a><div class="element clickable method public method_or_not_group_start" data-toggle="collapse" data-target=".method_or_not_group_start .collapse" title="public">
|
|
||||||
<h2>Adds a paren to the current query for query grouping,
|
|
||||||
prefixed with 'OR NOT'</h2>
|
|
||||||
<pre>or_not_group_start() : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_or_not_like"></a><div class="element clickable method public method_or_not_like" data-toggle="collapse" data-target=".method_or_not_like .collapse" title="public">
|
|
||||||
<h2>Generates a OR NOT LIKE clause</h2>
|
|
||||||
<pre>or_not_like(string $field, mixed $val, string $pos<code> = 'both'</code>) : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$field</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$val</h4>
|
|
||||||
<code>mixed</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$pos</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_or_where"></a><div class="element clickable method public method_or_where" data-toggle="collapse" data-target=".method_or_where .collapse" title="public">
|
|
||||||
<h2>Where clause prefixed with "OR"</h2>
|
|
||||||
<pre>or_where(string $key, mixed $val<code> = array()</code>) : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$key</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$val</h4>
|
|
||||||
<code>mixed</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_or_where_in"></a><div class="element clickable method public method_or_where_in" data-toggle="collapse" data-target=".method_or_where_in .collapse" title="public">
|
|
||||||
<h2>Where in statement prefixed with "or"</h2>
|
|
||||||
<pre>or_where_in(string $field, mixed $val<code> = array()</code>) : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$field</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$val</h4>
|
|
||||||
<code>mixed</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_or_where_not_in"></a><div class="element clickable method public method_or_where_not_in" data-toggle="collapse" data-target=".method_or_where_not_in .collapse" title="public">
|
|
||||||
<h2>OR WHERE NOT IN (FOO) clause</h2>
|
|
||||||
<pre>or_where_not_in(string $field, mixed $val<code> = array()</code>) : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$field</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$val</h4>
|
|
||||||
<code>mixed</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_order_by"></a><div class="element clickable method public method_order_by" data-toggle="collapse" data-target=".method_order_by .collapse" title="public">
|
|
||||||
<h2>Order the results by the selected field(s)</h2>
|
|
||||||
<pre>order_by(string $field, string $type<code> = ""</code>) : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$field</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$type</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_reset_query"></a><div class="element clickable method public method_reset_query" data-toggle="collapse" data-target=".method_reset_query .collapse" title="public">
|
|
||||||
<h2>Clear out the class variables, so the next query can be run</h2>
|
|
||||||
<pre>reset_query() : void</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_select"></a><div class="element clickable method public method_select" data-toggle="collapse" data-target=".method_select .collapse" title="public">
|
|
||||||
<h2>Specifies rows to select in a query</h2>
|
|
||||||
<pre>select(string $fields) : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$fields</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_select_avg"></a><div class="element clickable method public method_select_avg" data-toggle="collapse" data-target=".method_select_avg .collapse" title="public">
|
|
||||||
<h2>Selects the average value of a field from a query</h2>
|
|
||||||
<pre>select_avg(string $field, string $as<code> = FALSE</code>) : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$field</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$as</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_select_max"></a><div class="element clickable method public method_select_max" data-toggle="collapse" data-target=".method_select_max .collapse" title="public">
|
|
||||||
<h2>Selects the maximum value of a field from a query</h2>
|
|
||||||
<pre>select_max(string $field, string $as<code> = FALSE</code>) : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$field</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$as</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_select_min"></a><div class="element clickable method public method_select_min" data-toggle="collapse" data-target=".method_select_min .collapse" title="public">
|
|
||||||
<h2>Selects the minimum value of a field from a query</h2>
|
|
||||||
<pre>select_min(string $field, string $as<code> = FALSE</code>) : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$field</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$as</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_select_sum"></a><div class="element clickable method public method_select_sum" data-toggle="collapse" data-target=".method_select_sum .collapse" title="public">
|
|
||||||
<h2>Selects the sum of a field from a query</h2>
|
|
||||||
<pre>select_sum(string $field, string $as<code> = FALSE</code>) : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$field</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$as</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_set"></a><div class="element clickable method public method_set" data-toggle="collapse" data-target=".method_set .collapse" title="public">
|
|
||||||
<h2>Sets values for inserts / updates / deletes</h2>
|
|
||||||
<pre>set(mixed $key, mixed $val<code> = NULL</code>) : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$key</h4>
|
|
||||||
<code>mixed</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$val</h4>
|
|
||||||
<code>mixed</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_update"></a><div class="element clickable method public method_update" data-toggle="collapse" data-target=".method_update .collapse" title="public">
|
|
||||||
<h2>Creates an update clause, and executes it</h2>
|
|
||||||
<pre>update(string $table, mixed $data<code> = array()</code>) : mixed</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$table</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$data</h4>
|
|
||||||
<code>mixed</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>mixed</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_where"></a><div class="element clickable method public method_where" data-toggle="collapse" data-target=".method_where .collapse" title="public">
|
|
||||||
<h2>Specify condition(s) in the where clause of a query
|
|
||||||
Note: this function works with key / value, or a
|
|
||||||
passed array with key / value pairs</h2>
|
|
||||||
<pre>where(mixed $key, mixed $val<code> = array()</code>, bool $escape<code> = NULL</code>) : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$key</h4>
|
|
||||||
<code>mixed</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$val</h4>
|
|
||||||
<code>mixed</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$escape</h4>
|
|
||||||
<code>bool</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_where_in"></a><div class="element clickable method public method_where_in" data-toggle="collapse" data-target=".method_where_in .collapse" title="public">
|
|
||||||
<h2>Where clause with 'IN' statement</h2>
|
|
||||||
<pre>where_in(mixed $field, mixed $val<code> = array()</code>) : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$field</h4>
|
|
||||||
<code>mixed</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$val</h4>
|
|
||||||
<code>mixed</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_where_not_in"></a><div class="element clickable method public method_where_not_in" data-toggle="collapse" data-target=".method_where_not_in .collapse" title="public">
|
|
||||||
<h2>WHERE NOT IN (FOO) clause</h2>
|
|
||||||
<pre>where_not_in(string $field, mixed $val<code> = array()</code>) : \iQuery_Builder</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>fluent</th>
|
|
||||||
<td>This method is part of a fluent interface and will return the same instance</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$field</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$val</h4>
|
|
||||||
<code>mixed</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>\iQuery_Builder</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row"><footer class="span12">
|
|
||||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.2.0
|
|
||||||
</a> and<br>
|
|
||||||
generated on 2014-03-26T20:50:45-04:00.<br></footer></div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,302 +0,0 @@
|
|||||||
<!DOCTYPE html><html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Query » \idriver</title>
|
|
||||||
<meta name="author" content="Mike van Riel">
|
|
||||||
<meta name="description" content="">
|
|
||||||
<link href="../css/template.css" rel="stylesheet" media="all">
|
|
||||||
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script><script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script><script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script><script src="../js/bootstrap.js" type="text/javascript"></script><script src="../js/template.js" type="text/javascript"></script><script src="../js/prettify/prettify.min.js" type="text/javascript"></script><link rel="shortcut icon" href="../img/favicon.ico">
|
|
||||||
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
|
|
||||||
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
|
|
||||||
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="navbar navbar-fixed-top">
|
|
||||||
<div class="navbar-inner"><div class="container">
|
|
||||||
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a><a class="brand" href="../index.html">Query</a><div class="nav-collapse"><ul class="nav">
|
|
||||||
<li class="dropdown">
|
|
||||||
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
|
|
||||||
API Documentation <b class="caret"></b></a><ul class="dropdown-menu">
|
|
||||||
<li><a>Packages</a></li>
|
|
||||||
<li><a href="../packages/Query.html"><i class="icon-folder-open"></i> Query</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li class="dropdown" id="charts-menu">
|
|
||||||
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
|
|
||||||
Charts <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="../graph_class.html"><i class="icon-list-alt"></i> Class hierarchy diagram</a></li></ul>
|
|
||||||
</li>
|
|
||||||
<li class="dropdown" id="reports-menu">
|
|
||||||
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
|
|
||||||
Reports <b class="caret"></b></a><ul class="dropdown-menu">
|
|
||||||
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors
|
|
||||||
<span class="label label-info">0</span></a></li>
|
|
||||||
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers
|
|
||||||
<ul></ul></a></li>
|
|
||||||
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements
|
|
||||||
<span class="label label-info">0</span></a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul></div>
|
|
||||||
</div></div>
|
|
||||||
<div class="go_to_top"><a href="#___" style="color: inherit">Back to top <i class="icon-upload icon-white"></i></a></div>
|
|
||||||
</div>
|
|
||||||
<div id="___" class="container">
|
|
||||||
<noscript><div class="alert alert-warning">
|
|
||||||
Javascript is disabled; several features are only available
|
|
||||||
if Javascript is enabled.
|
|
||||||
</div></noscript>
|
|
||||||
<div class="row">
|
|
||||||
<div class="span4">
|
|
||||||
<div class="btn-toolbar">
|
|
||||||
<div class="btn-group visibility" data-toggle="buttons-checkbox">
|
|
||||||
<button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button>
|
|
||||||
</div>
|
|
||||||
<div class="btn-group view pull-right" data-toggle="buttons-radio">
|
|
||||||
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<ul class="side-nav nav nav-list"><li class="nav-header">
|
|
||||||
<i title="Methods" class="icon-custom icon-method"></i> Methods
|
|
||||||
<ul>
|
|
||||||
<li class="method public "><a href="#method___construct" title="__construct() :: Constructor/Connection method"><span class="description">Constructor/Connection method</span><pre>__construct()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_beginTransaction" title="beginTransaction() :: Begin a transaction"><span class="description">Begin a transaction</span><pre>beginTransaction()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_commit" title="commit() :: Commit a transaction"><span class="description">Commit a transaction</span><pre>commit()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_errorCode" title="errorCode() :: Return the current error code"><span class="description">Return the current error code</span><pre>errorCode()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_errorInfo" title="errorInfo() :: Return information about the current error"><span class="description">Return information about the current error</span><pre>errorInfo()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_exec" title="exec() :: Execute an SQL statement and return the number of affected rows"><span class="description">Execute an SQL statement and return the number of affected rows</span><pre>exec()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_getAttribute" title="getAttribute() :: Get a connection attribute for the current db driver"><span class="description">Get a connection attribute for the current db driver</span><pre>getAttribute()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_inTransaction" title="inTransaction() :: Check if currently in a transaction"><span class="description">Check if currently in a transaction</span><pre>inTransaction()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_lastInsertId" title="lastInsertId() :: Returns the id of the last row inserted into the database"><span class="description">Returns the id of the last row inserted into the database</span><pre>lastInsertId()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_prepare" title="prepare() :: Prepare a statement for execution"><span class="description">Prepare a statement for execution</span><pre>prepare()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_query" title="query() :: Executes an sql statement"><span class="description">Executes an sql statement</span><pre>query()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_quote" title="quote() :: Quotes a string for use in a query"><span class="description">Quotes a string for use in a query</span><pre>quote()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_rollback" title="rollback() :: Rollback a transaction"><span class="description">Rollback a transaction</span><pre>rollback()</pre></a></li>
|
|
||||||
<li class="method public "><a href="#method_setAttribute" title="setAttribute() :: Set a connection attribute"><span class="description">Set a connection attribute</span><pre>setAttribute()</pre></a></li>
|
|
||||||
</ul>
|
|
||||||
</li></ul>
|
|
||||||
</div>
|
|
||||||
<div class="span8">
|
|
||||||
<a id="\idriver"></a><ul class="breadcrumb">
|
|
||||||
<li>
|
|
||||||
<a href="../index.html"><i title="Classes" class="icon-custom icon-class"></i></a><span class="divider">\</span>
|
|
||||||
</li>
|
|
||||||
<li class="active">
|
|
||||||
<span class="divider">\</span><a href="../classes/idriver.html">idriver</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<div class="element interface">
|
|
||||||
<p class="short_description">PDO Interface to implement for database drivers</p>
|
|
||||||
<div class="details">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>
|
|
||||||
<i title="Methods" class="icon-custom icon-method"></i> Methods</h3>
|
|
||||||
<a id="method___construct"></a><div class="element clickable method public method___construct" data-toggle="collapse" data-target=".method___construct .collapse" title="public">
|
|
||||||
<h2>Constructor/Connection method</h2>
|
|
||||||
<pre>__construct(string $dsn, \[string] $username<code> = NULL</code>, \[string] $password<code> = NULL</code>, \[array] $driver_options<code> = array()</code>) : void</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$dsn</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$username</h4>
|
|
||||||
<code><a href="%5Bstring%5D.html">\[string]</a></code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$password</h4>
|
|
||||||
<code><a href="%5Bstring%5D.html">\[string]</a></code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$driver_options</h4>
|
|
||||||
<code><a href="%5Barray%5D.html">\[array]</a></code>
|
|
||||||
</div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_beginTransaction"></a><div class="element clickable method public method_beginTransaction" data-toggle="collapse" data-target=".method_beginTransaction .collapse" title="public">
|
|
||||||
<h2>Begin a transaction</h2>
|
|
||||||
<pre>beginTransaction() : bool</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>bool</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_commit"></a><div class="element clickable method public method_commit" data-toggle="collapse" data-target=".method_commit .collapse" title="public">
|
|
||||||
<h2>Commit a transaction</h2>
|
|
||||||
<pre>commit() : bool</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>bool</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_errorCode"></a><div class="element clickable method public method_errorCode" data-toggle="collapse" data-target=".method_errorCode .collapse" title="public">
|
|
||||||
<h2>Return the current error code</h2>
|
|
||||||
<pre>errorCode() : mixed</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>mixed</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_errorInfo"></a><div class="element clickable method public method_errorInfo" data-toggle="collapse" data-target=".method_errorInfo .collapse" title="public">
|
|
||||||
<h2>Return information about the current error</h2>
|
|
||||||
<pre>errorInfo() : array</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>array</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_exec"></a><div class="element clickable method public method_exec" data-toggle="collapse" data-target=".method_exec .collapse" title="public">
|
|
||||||
<h2>Execute an SQL statement and return the number of affected rows</h2>
|
|
||||||
<pre>exec(string $statement) : int</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$statement</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>int</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_getAttribute"></a><div class="element clickable method public method_getAttribute" data-toggle="collapse" data-target=".method_getAttribute .collapse" title="public">
|
|
||||||
<h2>Get a connection attribute for the current db driver</h2>
|
|
||||||
<pre>getAttribute(int $attribute) </pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<table class="table table-bordered"><tr>
|
|
||||||
<th>returm</th>
|
|
||||||
<td>mixed</td>
|
|
||||||
</tr></table>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$attribute</h4>
|
|
||||||
<code>int</code>
|
|
||||||
</div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_inTransaction"></a><div class="element clickable method public method_inTransaction" data-toggle="collapse" data-target=".method_inTransaction .collapse" title="public">
|
|
||||||
<h2>Check if currently in a transaction</h2>
|
|
||||||
<pre>inTransaction() : bool</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>bool</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_lastInsertId"></a><div class="element clickable method public method_lastInsertId" data-toggle="collapse" data-target=".method_lastInsertId .collapse" title="public">
|
|
||||||
<h2>Returns the id of the last row inserted into the database</h2>
|
|
||||||
<pre>lastInsertId(\[string] $name<code> = NULL</code>) : string</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$name</h4>
|
|
||||||
<code><a href="%5Bstring%5D.html">\[string]</a></code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>string</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_prepare"></a><div class="element clickable method public method_prepare" data-toggle="collapse" data-target=".method_prepare .collapse" title="public">
|
|
||||||
<h2>Prepare a statement for execution</h2>
|
|
||||||
<pre>prepare(string $statement, \[array] $driver_options<code> = array()</code>) : <a href="PDOStatement.html">\PDOStatement</a></pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$statement</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$driver_options</h4>
|
|
||||||
<code><a href="%5Barray%5D.html">\[array]</a></code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code><a href="PDOStatement.html">\PDOStatement</a></code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_query"></a><div class="element clickable method public method_query" data-toggle="collapse" data-target=".method_query .collapse" title="public">
|
|
||||||
<h2>Executes an sql statement</h2>
|
|
||||||
<pre>query() : <a href="PDOStatement.html">\PDOStatement</a></pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code><a href="PDOStatement.html">\PDOStatement</a></code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_quote"></a><div class="element clickable method public method_quote" data-toggle="collapse" data-target=".method_quote .collapse" title="public">
|
|
||||||
<h2>Quotes a string for use in a query</h2>
|
|
||||||
<pre>quote(string $string, \[int] $parameter_type<code> = \PDO::PARAM_STRING</code>) </pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$string</h4>
|
|
||||||
<code>string</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$parameter_type</h4>
|
|
||||||
<code><a href="%5Bint%5D.html">\[int]</a></code><p>#return string</p></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_rollback"></a><div class="element clickable method public method_rollback" data-toggle="collapse" data-target=".method_rollback .collapse" title="public">
|
|
||||||
<h2>Rollback a transaction</h2>
|
|
||||||
<pre>rollback() : bool</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>bool</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
<a id="method_setAttribute"></a><div class="element clickable method public method_setAttribute" data-toggle="collapse" data-target=".method_setAttribute .collapse" title="public">
|
|
||||||
<h2>Set a connection attribute</h2>
|
|
||||||
<pre>setAttribute(int $attribute, mixed $value) : bool</pre>
|
|
||||||
<div class="labels"></div>
|
|
||||||
<div class="row collapse"><div class="detail-description">
|
|
||||||
<div class="long_description"></div>
|
|
||||||
<h3>Parameters</h3>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$attribute</h4>
|
|
||||||
<code>int</code>
|
|
||||||
</div>
|
|
||||||
<div class="subelement argument">
|
|
||||||
<h4>$value</h4>
|
|
||||||
<code>mixed</code>
|
|
||||||
</div>
|
|
||||||
<h3>Returns</h3>
|
|
||||||
<div class="subelement response"><code>bool</code></div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row"><footer class="span12">
|
|
||||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.2.0
|
|
||||||
</a> and<br>
|
|
||||||
generated on 2014-03-26T20:50:45-04:00.<br></footer></div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
Reference in New Issue
Block a user