miniMVC/docs/classes/miniMVC.DB.html

1611 lines
69 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html xmlns:date="http://exslt.org/dates-and-times" 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>miniMVC » \miniMVC\DB</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">miniMVC</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/Default.html"><i class="icon-folder-open"></i> Default</a></li>
<li><a href="../packages/Query.html"><i class="icon-folder-open"></i> Query</a></li>
<li><a href="../packages/miniMVC.html"><i class="icon-folder-open"></i> miniMVC</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><li>todo 
<span class="label label-info">5</span>
</li></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">
<span 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></span><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>
<ul class="side-nav nav nav-list">
<li class="nav-header">
<i class="icon-custom icon-method"></i> Methods</li>
<li class="method public inherited"><a href="#__call" title="__call :: Calls a function further down the inheritence chain"><span class="description">Calls a function further down the inheritence chain</span><pre>__call()</pre></a></li>
<li class="method public inherited"><a href="#__construct" title="__construct :: Constructor"><span class="description">Constructor</span><pre>__construct()</pre></a></li>
<li class="method public inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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="#get_instance" title="get_instance :: Indexed singleton method"><span class="description">Indexed singleton method</span><pre>get_instance()</pre></a></li>
<li class="method public "><a href="#get_last_error" title="get_last_error :: Returns the last error from the database"><span class="description">Returns the last error from the database</span><pre>get_last_error()</pre></a></li>
<li class="method public inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#having" title="having :: Generates a 'Having' clause"><span class="description">Generates a 'Having' clause</span><pre>having()</pre></a></li>
<li class="method public inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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 inherited"><a href="#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>
<li class="nav-header private">» Private</li>
<li class="method private inherited"><a href="#_compile" title="_compile :: String together the sql statements for sending to the db"><span class="description">String together the sql statements for sending to the db</span><pre>_compile()</pre></a></li>
<li class="method private inherited"><a href="#_having" title="_having :: Simplify building having clauses"><span class="description">Simplify building having clauses</span><pre>_having()</pre></a></li>
<li class="method private inherited"><a href="#_like" title="_like :: Simplify 'like' methods"><span class="description">Simplify 'like' methods</span><pre>_like()</pre></a></li>
<li class="method private inherited"><a href="#_reset" title="_reset :: 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()</pre></a></li>
<li class="method private inherited"><a href="#_select" title="_select :: Method to simplify select_ methods"><span class="description">Method to simplify select_ methods</span><pre>_select()</pre></a></li>
<li class="method private inherited"><a href="#_where" title="_where :: Do all the repeditive stuff for where/having type methods"><span class="description">Do all the repeditive stuff for where/having type methods</span><pre>_where()</pre></a></li>
<li class="method private inherited"><a href="#_where_in" title="_where_in :: Simplify where_in methods"><span class="description">Simplify where_in methods</span><pre>_where_in()</pre></a></li>
<li class="method private inherited"><a href="#_where_string" title="_where_string :: Simplify generating where string"><span class="description">Simplify generating where string</span><pre>_where_string()</pre></a></li>
<li class="nav-header">
<i class="icon-custom icon-property"></i> Properties</li>
<li class="property public inherited"><a href="#%24conn_name" title="$conn_name :: Convenience property for connection management"><span class="description">Convenience property for connection management</span><pre>$conn_name</pre></a></li>
<li class="property public inherited"><a href="#%24sql" title="$sql :: Alias to $this-&gt;db-&gt;sql"><span class="description">Alias to $this-&gt;db-&gt;sql</span><pre>$sql</pre></a></li>
<li class="nav-header private">» Private</li>
<li class="property private inherited"><a href="#%24from_string" title="$from_string :: Compiled 'from' clause"><span class="description">Compiled 'from' clause</span><pre>$from_string</pre></a></li>
<li class="property private inherited"><a href="#%24group_array" title="$group_array :: Key/val pairs for group by clause"><span class="description">Key/val pairs for group by clause</span><pre>$group_array</pre></a></li>
<li class="property private inherited"><a href="#%24group_string" title="$group_string :: Group by clause"><span class="description">Group by clause</span><pre>$group_string</pre></a></li>
<li class="property private inherited"><a href="#%24having_map" title="$having_map :: Map for having clause"><span class="description">Map for having clause</span><pre>$having_map</pre></a></li>
<li class="property private "><a href="#%24instance" title="$instance :: DB connection instances"><span class="description">DB connection instances</span><pre>$instance</pre></a></li>
<li class="property private inherited"><a href="#%24limit" title="$limit :: Value for limit string"><span class="description">Value for limit string</span><pre>$limit</pre></a></li>
<li class="property private inherited"><a href="#%24offset" title="$offset :: Value for offset in limit string"><span class="description">Value for offset in limit string</span><pre>$offset</pre></a></li>
<li class="property private inherited"><a href="#%24order_array" title="$order_array :: Key/val pairs for order by clause"><span class="description">Key/val pairs for order by clause</span><pre>$order_array</pre></a></li>
<li class="property private inherited"><a href="#%24order_string" title="$order_string :: Order by clause"><span class="description">Order by clause</span><pre>$order_string</pre></a></li>
<li class="property private inherited"><a href="#%24query_map" title="$query_map :: Query component order mapping
for complex select queries"><span class="description">Query component order mapping
for complex select queries</span><pre>$query_map</pre></a></li>
<li class="property private inherited"><a href="#%24select_string" title="$select_string :: Compiled 'select' clause"><span class="description">Compiled 'select' clause</span><pre>$select_string</pre></a></li>
<li class="property private inherited"><a href="#%24set_array_keys" title="$set_array_keys :: Keys for insert/update statement"><span class="description">Keys for insert/update statement</span><pre>$set_array_keys</pre></a></li>
<li class="property private inherited"><a href="#%24set_string" title="$set_string :: Compiled arguments for insert / update"><span class="description">Compiled arguments for insert / update</span><pre>$set_string</pre></a></li>
<li class="property private inherited"><a href="#%24values" title="$values :: Values to apply to prepared statements"><span class="description">Values to apply to prepared statements</span><pre>$values</pre></a></li>
</ul>
</div>
<div class="span8">
<a name="%5CminiMVC%5CDB" id="\miniMVC\DB"></a><ul class="breadcrumb">
<li>
<a href="../index.html"><i class="icon-custom icon-class"></i></a><span class="divider">\</span>
</li>
<li><a href="../namespaces/miniMVC.html">miniMVC</a></li>
<li class="active">
<span class="divider">\</span><a href="../classes/miniMVC.DB.html">DB</a>
</li>
</ul>
<div href="../classes/miniMVC.DB.html" class="element class">
<p class="short_description">Extend PHP's PDO class to add some more functionality</p>
<div class="details">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>package</th>
<td><a href="..//packages/miniMVC.System.html">miniMVC</a></td>
</tr>
<tr>
<th>subpackage</th>
<td>System</td>
</tr>
</table>
<h3>
<i class="icon-custom icon-method"></i> Methods</h3>
<a name="__call" id="__call"></a><div class="element clickable method public __call" data-toggle="collapse" data-target=".__call .collapse">
<h2>Calls a function further down the inheritence chain</h2>
<pre>__call(string $name, array $params) : mixed</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::__call()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$name</h4>
<code>string</code>
</div>
<div class="subelement argument">
<h4>$params</h4>
<code>array</code>
</div>
<h3>Returns</h3>
<div class="subelement response"><code>mixed</code></div>
</div></div>
</div>
<a name="__construct" id="__construct"></a><div class="element clickable method public __construct" data-toggle="collapse" data-target=".__construct .collapse">
<h2>Constructor</h2>
<pre>__construct(object $params) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::__construct()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$params</h4>
<code>object</code><ul>
<li>the connection parametere</li>
</ul>
</div>
</div></div>
</div>
<a name="count_all" id="count_all"></a><div class="element clickable method public count_all" data-toggle="collapse" data-target=".count_all .collapse">
<h2>Retreive the number of rows in the selected table</h2>
<pre>count_all(string $table) : int</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::count_all()</td>
</tr></table>
<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 name="count_all_results" id="count_all_results"></a><div class="element clickable method public count_all_results" data-toggle="collapse" data-target=".count_all_results .collapse">
<h2>Retrieve the number of results for the generated query - used
in place of the get() method</h2>
<pre>count_all_results(string $table) : int</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::count_all_results()</td>
</tr></table>
<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 name="delete" id="delete"></a><div class="element clickable method public delete" data-toggle="collapse" data-target=".delete .collapse">
<h2>Deletes data from a table</h2>
<pre>delete(string $table, mixed $where) : mixed</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::delete()</td>
</tr></table>
<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 name="distinct" id="distinct"></a><div class="element clickable method public distinct" data-toggle="collapse" data-target=".distinct .collapse">
<h2>Adds the 'distinct' keyword to a query</h2>
<pre>distinct() : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::distinct()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="from" id="from"></a><div class="element clickable method public from" data-toggle="collapse" data-target=".from .collapse">
<h2>Specify the database table to select from</h2>
<pre>from(string $dbname) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::from()</td>
</tr>
<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>$dbname</h4>
<code>string</code>
</div>
<h3>Returns</h3>
<div class="subelement response"><code><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="get" id="get"></a><div class="element clickable method public get" data-toggle="collapse" data-target=".get .collapse">
<h2>Select and retrieve all records from the current table, and/or
execute current compiled query</h2>
<pre>get($table, int $limit, int $offset) : object</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::get()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$table</h4>
<code></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 name="get_instance" id="get_instance"></a><div class="element clickable method public get_instance" data-toggle="collapse" data-target=".get_instance .collapse">
<h2>Indexed singleton method</h2>
<pre>get_instance(string $dbname, array $options) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$dbname</h4>
<code>string</code>
</div>
<div class="subelement argument">
<h4>$options</h4>
<code>array</code>
</div>
<h3>Returns</h3>
<div class="subelement response"><code><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="get_last_error" id="get_last_error"></a><div class="element clickable method public get_last_error" data-toggle="collapse" data-target=".get_last_error .collapse">
<h2>Returns the last error from the database</h2>
<pre>get_last_error() : string</pre>
<div class="labels"></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<h3>Returns</h3>
<div class="subelement response"><code>string</code></div>
</div></div>
</div>
<a name="get_where" id="get_where"></a><div class="element clickable method public get_where" data-toggle="collapse" data-target=".get_where .collapse">
<h2>Convience method for get() with a where clause</h2>
<pre>get_where(string $table, array $where, int $limit, int $offset) : object</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::get_where()</td>
</tr></table>
<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 name="group_by" id="group_by"></a><div class="element clickable method public group_by" data-toggle="collapse" data-target=".group_by .collapse">
<h2>Group the results by the selected field(s)</h2>
<pre>group_by(mixed $field) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::group_by()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="group_end" id="group_end"></a><div class="element clickable method public group_end" data-toggle="collapse" data-target=".group_end .collapse">
<h2>Ends a query group</h2>
<pre>group_end() : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::group_end()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="group_start" id="group_start"></a><div class="element clickable method public group_start" data-toggle="collapse" data-target=".group_start .collapse">
<h2>Adds a paren to the current query for query grouping</h2>
<pre>group_start() : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::group_start()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="having" id="having"></a><div class="element clickable method public having" data-toggle="collapse" data-target=".having .collapse">
<h2>Generates a 'Having' clause</h2>
<pre>having(mixed $key, mixed $val) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::having()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="insert" id="insert"></a><div class="element clickable method public insert" data-toggle="collapse" data-target=".insert .collapse">
<h2>Creates an insert clause, and executes it</h2>
<pre>insert(string $table, mixed $data) : mixed</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::insert()</td>
</tr></table>
<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 name="join" id="join"></a><div class="element clickable method public join" data-toggle="collapse" data-target=".join .collapse">
<h2>Creates a join phrase in a compiled query</h2>
<pre>join(string $table, string $condition, string $type) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::join()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="like" id="like"></a><div class="element clickable method public like" data-toggle="collapse" data-target=".like .collapse">
<h2>Creates a Like clause in the sql statement</h2>
<pre>like(string $field, mixed $val, string $pos) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::like()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="limit" id="limit"></a><div class="element clickable method public limit" data-toggle="collapse" data-target=".limit .collapse">
<h2>Set a limit on the current sql statement</h2>
<pre>limit(int $limit, int $offset) : string</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::limit()</td>
</tr></table>
<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 name="not_like" id="not_like"></a><div class="element clickable method public not_like" data-toggle="collapse" data-target=".not_like .collapse">
<h2>Generates a NOT LIKE clause</h2>
<pre>not_like(string $field, mixed $val, string $pos) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::not_like()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="or_group_start" id="or_group_start"></a><div class="element clickable method public or_group_start" data-toggle="collapse" data-target=".or_group_start .collapse">
<h2>Adds a paren to the current query for query grouping,
prefixed with 'OR'</h2>
<pre>or_group_start() : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::or_group_start()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="or_having" id="or_having"></a><div class="element clickable method public or_having" data-toggle="collapse" data-target=".or_having .collapse">
<h2>Generates a 'Having' clause prefixed with 'OR'</h2>
<pre>or_having(mixed $key, mixed $val) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::or_having()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="or_like" id="or_like"></a><div class="element clickable method public or_like" data-toggle="collapse" data-target=".or_like .collapse">
<h2>Generates an OR Like clause</h2>
<pre>or_like(string $field, mixed $val, string $pos) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::or_like()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="or_not_group_start" id="or_not_group_start"></a><div class="element clickable method public or_not_group_start" data-toggle="collapse" data-target=".or_not_group_start .collapse">
<h2>Adds a paren to the current query for query grouping,
prefixed with 'OR NOT'</h2>
<pre>or_not_group_start() : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::or_not_group_start()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="or_not_like" id="or_not_like"></a><div class="element clickable method public or_not_like" data-toggle="collapse" data-target=".or_not_like .collapse">
<h2>Generates a OR NOT LIKE clause</h2>
<pre>or_not_like(string $field, mixed $val, string $pos) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::or_not_like()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="or_where" id="or_where"></a><div class="element clickable method public or_where" data-toggle="collapse" data-target=".or_where .collapse">
<h2>Where clause prefixed with "OR"</h2>
<pre>or_where(string $key, mixed $val) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::or_where()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="or_where_in" id="or_where_in"></a><div class="element clickable method public or_where_in" data-toggle="collapse" data-target=".or_where_in .collapse">
<h2>Where in statement prefixed with "or"</h2>
<pre>or_where_in(string $field, mixed $val) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::or_where_in()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="or_where_not_in" id="or_where_not_in"></a><div class="element clickable method public or_where_not_in" data-toggle="collapse" data-target=".or_where_not_in .collapse">
<h2>OR WHERE NOT IN (FOO) clause</h2>
<pre>or_where_not_in(string $field, mixed $val) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::or_where_not_in()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="order_by" id="order_by"></a><div class="element clickable method public order_by" data-toggle="collapse" data-target=".order_by .collapse">
<h2>Order the results by the selected field(s)</h2>
<pre>order_by(string $field, string $type) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::order_by()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="select" id="select"></a><div class="element clickable method public select" data-toggle="collapse" data-target=".select .collapse">
<h2>Specifies rows to select in a query</h2>
<pre>select(string $fields) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::select()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="select_avg" id="select_avg"></a><div class="element clickable method public select_avg" data-toggle="collapse" data-target=".select_avg .collapse">
<h2>Selects the average value of a field from a query</h2>
<pre>select_avg(string $field, string $as) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::select_avg()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="select_max" id="select_max"></a><div class="element clickable method public select_max" data-toggle="collapse" data-target=".select_max .collapse">
<h2>Selects the maximum value of a field from a query</h2>
<pre>select_max(string $field, string $as) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::select_max()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="select_min" id="select_min"></a><div class="element clickable method public select_min" data-toggle="collapse" data-target=".select_min .collapse">
<h2>Selects the minimum value of a field from a query</h2>
<pre>select_min(string $field, string $as) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::select_min()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="select_sum" id="select_sum"></a><div class="element clickable method public select_sum" data-toggle="collapse" data-target=".select_sum .collapse">
<h2>Selects the sum of a field from a query</h2>
<pre>select_sum(string $field, string $as) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::select_sum()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="set" id="set"></a><div class="element clickable method public set" data-toggle="collapse" data-target=".set .collapse">
<h2>Sets values for inserts / updates / deletes</h2>
<pre>set(mixed $key, mixed $val) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::set()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="update" id="update"></a><div class="element clickable method public update" data-toggle="collapse" data-target=".update .collapse">
<h2>Creates an update clause, and executes it</h2>
<pre>update(string $table, mixed $data) : mixed</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::update()</td>
</tr></table>
<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 name="where" id="where"></a><div class="element clickable method public where" data-toggle="collapse" data-target=".where .collapse">
<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) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::where()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="where_in" id="where_in"></a><div class="element clickable method public where_in" data-toggle="collapse" data-target=".where_in .collapse">
<h2>Where clause with 'IN' statement</h2>
<pre>where_in(mixed $field, mixed $val) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::where_in()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="where_not_in" id="where_not_in"></a><div class="element clickable method public where_not_in" data-toggle="collapse" data-target=".where_not_in .collapse">
<h2>WHERE NOT IN (FOO) clause</h2>
<pre>where_not_in(string $field, mixed $val) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::where_not_in()</td>
</tr>
<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><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="_compile" id="_compile"></a><div class="element clickable method private _compile" data-toggle="collapse" data-target="._compile .collapse">
<h2>String together the sql statements for sending to the db</h2>
<pre>_compile(string $type, string $table) : \$string</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::_compile()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$type</h4>
<code>string</code>
</div>
<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 name="_having" id="_having"></a><div class="element clickable method private _having" data-toggle="collapse" data-target="._having .collapse">
<h2>Simplify building having clauses</h2>
<pre>_having(mixed $key, mixed $val, string $conj) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::_having()</td>
</tr>
<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>$conj</h4>
<code>string</code>
</div>
<h3>Returns</h3>
<div class="subelement response"><code><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="_like" id="_like"></a><div class="element clickable method private _like" data-toggle="collapse" data-target="._like .collapse">
<h2>Simplify 'like' methods</h2>
<pre>_like(string $field, mixed $val, string $pos, string $like, string $conj) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::_like()</td>
</tr>
<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>
<div class="subelement argument">
<h4>$like</h4>
<code>string</code>
</div>
<div class="subelement argument">
<h4>$conj</h4>
<code>string</code>
</div>
<h3>Returns</h3>
<div class="subelement response"><code><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="_reset" id="_reset"></a><div class="element clickable method private _reset" data-toggle="collapse" data-target="._reset .collapse">
<h2>Clear out the class variables, so the next query can be run</h2>
<pre>_reset() : void</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::_reset()</td>
</tr></table>
</div></div>
</div>
<a name="_select" id="_select"></a><div class="element clickable method private _select" data-toggle="collapse" data-target="._select .collapse">
<h2>Method to simplify select_ methods</h2>
<pre>_select(string $field, string $as) : string</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::_select()</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>string</code></div>
</div></div>
</div>
<a name="_where" id="_where"></a><div class="element clickable method private _where" data-toggle="collapse" data-target="._where .collapse">
<h2>Do all the repeditive stuff for where/having type methods</h2>
<pre>_where(mixed $key, mixed $val) : array</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::_where()</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>array</code></div>
</div></div>
</div>
<a name="_where_in" id="_where_in"></a><div class="element clickable method private _where_in" data-toggle="collapse" data-target="._where_in .collapse">
<h2>Simplify where_in methods</h2>
<pre>_where_in(mixed $key, mixed $val, $in, $conj) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::_where_in()</td>
</tr>
<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>$in</h4>
<code></code><p>string</p></div>
<div class="subelement argument">
<h4>$conj</h4>
<code></code><p>string</p></div>
<h3>Returns</h3>
<div class="subelement response"><code><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<a name="_where_string" id="_where_string"></a><div class="element clickable method private _where_string" data-toggle="collapse" data-target="._where_string .collapse">
<h2>Simplify generating where string</h2>
<pre>_where_string(mixed $key, mixed $val, string $conj) : <a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Query_Builder::_where_string()</td>
</tr>
<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>$conj</h4>
<code>string</code>
</div>
<h3>Returns</h3>
<div class="subelement response"><code><a href="../classes/miniMVC.DB.html">\miniMVC\DB</a></code></div>
</div></div>
</div>
<h3>
<i class="icon-custom icon-property"></i> Properties</h3>
<a name="%24conn_name" id="$conn_name"> </a><div class="element clickable property public $conn_name" data-toggle="collapse" data-target=".$conn_name .collapse">
<h2>Convenience property for connection management</h2>
<pre>$conn_name : string</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::$$conn_name</td>
</tr></table>
</div></div>
</div>
<a name="%24sql" id="$sql"> </a><div class="element clickable property public $sql" data-toggle="collapse" data-target=".$sql .collapse">
<h2>Alias to $this-&gt;db-&gt;sql</h2>
<pre>$sql : <a href="../classes/DB_PDO.html">\DB_PDO</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::$$sql</td>
</tr></table>
</div></div>
</div>
<a name="%24from_string" id="$from_string"> </a><div class="element clickable property private $from_string" data-toggle="collapse" data-target=".$from_string .collapse">
<h2>Compiled 'from' clause</h2>
<pre>$from_string : string</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::$$from_string</td>
</tr></table>
</div></div>
</div>
<a name="%24group_array" id="$group_array"> </a><div class="element clickable property private $group_array" data-toggle="collapse" data-target=".$group_array .collapse">
<h2>Key/val pairs for group by clause</h2>
<pre>$group_array : array</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::$$group_array</td>
</tr></table>
</div></div>
</div>
<a name="%24group_string" id="$group_string"> </a><div class="element clickable property private $group_string" data-toggle="collapse" data-target=".$group_string .collapse">
<h2>Group by clause</h2>
<pre>$group_string : string</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::$$group_string</td>
</tr></table>
</div></div>
</div>
<a name="%24having_map" id="$having_map"> </a><div class="element clickable property private $having_map" data-toggle="collapse" data-target=".$having_map .collapse">
<h2>Map for having clause</h2>
<pre>$having_map : array</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::$$having_map</td>
</tr></table>
</div></div>
</div>
<a name="%24instance" id="$instance"> </a><div class="element clickable property private $instance" data-toggle="collapse" data-target=".$instance .collapse">
<h2>DB connection instances</h2>
<pre>$instance : array</pre>
<div class="labels"></div>
<div class="row collapse"><div class="span8"><p class="long_description"></p></div></div>
</div>
<a name="%24limit" id="$limit"> </a><div class="element clickable property private $limit" data-toggle="collapse" data-target=".$limit .collapse">
<h2>Value for limit string</h2>
<pre>$limit : int</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::$$limit</td>
</tr></table>
</div></div>
</div>
<a name="%24offset" id="$offset"> </a><div class="element clickable property private $offset" data-toggle="collapse" data-target=".$offset .collapse">
<h2>Value for offset in limit string</h2>
<pre>$offset : int</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::$$offset</td>
</tr></table>
</div></div>
</div>
<a name="%24order_array" id="$order_array"> </a><div class="element clickable property private $order_array" data-toggle="collapse" data-target=".$order_array .collapse">
<h2>Key/val pairs for order by clause</h2>
<pre>$order_array : array</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::$$order_array</td>
</tr></table>
</div></div>
</div>
<a name="%24order_string" id="$order_string"> </a><div class="element clickable property private $order_string" data-toggle="collapse" data-target=".$order_string .collapse">
<h2>Order by clause</h2>
<pre>$order_string : string</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::$$order_string</td>
</tr></table>
</div></div>
</div>
<a name="%24query_map" id="$query_map"> </a><div class="element clickable property private $query_map" data-toggle="collapse" data-target=".$query_map .collapse">
<h2>Query component order mapping
for complex select queries</h2>
<pre>$query_map : array</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"><p>Format:</p>
<p>array(
'type' => 'where',
'conjunction' => ' AND ',
'string' => 'k=?'
)</p></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::$$query_map</td>
</tr></table>
</div></div>
</div>
<a name="%24select_string" id="$select_string"> </a><div class="element clickable property private $select_string" data-toggle="collapse" data-target=".$select_string .collapse">
<h2>Compiled 'select' clause</h2>
<pre>$select_string : string</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::$$select_string</td>
</tr></table>
</div></div>
</div>
<a name="%24set_array_keys" id="$set_array_keys"> </a><div class="element clickable property private $set_array_keys" data-toggle="collapse" data-target=".$set_array_keys .collapse">
<h2>Keys for insert/update statement</h2>
<pre>$set_array_keys : array</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::$$set_array_keys</td>
</tr></table>
</div></div>
</div>
<a name="%24set_string" id="$set_string"> </a><div class="element clickable property private $set_string" data-toggle="collapse" data-target=".$set_string .collapse">
<h2>Compiled arguments for insert / update</h2>
<pre>$set_string : string</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::$$set_string</td>
</tr></table>
</div></div>
</div>
<a name="%24values" id="$values"> </a><div class="element clickable property private $values" data-toggle="collapse" data-target=".$values .collapse">
<h2>Values to apply to prepared statements</h2>
<pre>$values : array</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="span8">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\Query_Builder::$$values</td>
</tr></table>
</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.0.0a2</a> and<br>
generated on 2012-07-03T13:29:42-04:00.<br></footer></div>
</div>
</body>
</html>