mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
1477 lines
77 KiB
HTML
1477 lines
77 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Editor PHP 2.1.3</title>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<base href="../">
|
|
<link rel="icon" href="images/favicon.ico"/>
|
|
<link rel="stylesheet" href="css/normalize.css">
|
|
<link rel="stylesheet" href="css/base.css">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com">
|
|
<link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap" rel="stylesheet">
|
|
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="css/template.css">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
|
|
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
|
|
<script src="js/search.js"></script>
|
|
<script defer src="js/searchIndex.js"></script>
|
|
</head>
|
|
<body id="top">
|
|
<header class="phpdocumentor-header phpdocumentor-section">
|
|
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Editor PHP 2.1.3</a></h1>
|
|
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
|
|
<label class="phpdocumentor-header__menu-icon" for="menu-button">
|
|
<i class="fas fa-bars"></i>
|
|
</label>
|
|
<section data-search-form class="phpdocumentor-search">
|
|
<label>
|
|
<span class="visually-hidden">Search for</span>
|
|
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
|
|
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
|
|
</svg>
|
|
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
|
|
</label>
|
|
</section>
|
|
|
|
<nav class="phpdocumentor-topnav">
|
|
<ul class="phpdocumentor-topnav__menu">
|
|
</ul>
|
|
</nav>
|
|
</header>
|
|
|
|
<main class="phpdocumentor">
|
|
<div class="phpdocumentor-section">
|
|
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
|
|
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
|
|
Menu
|
|
</label>
|
|
<aside class="phpdocumentor-column -four phpdocumentor-sidebar">
|
|
<section class="phpdocumentor-sidebar__category">
|
|
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
|
|
<h4 class="phpdocumentor-sidebar__root-namespace">
|
|
<a href="namespaces/datatables.html" class="">DataTables</a>
|
|
</h4>
|
|
<ul class="phpdocumentor-list">
|
|
<li>
|
|
<a href="namespaces/datatables-database.html" class="">Database</a>
|
|
|
|
</li>
|
|
<li>
|
|
<a href="namespaces/datatables-editor.html" class="">Editor</a>
|
|
|
|
</li>
|
|
<li>
|
|
<a href="namespaces/datatables-htmlawed.html" class="">HtmLawed</a>
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
</section>
|
|
<section class="phpdocumentor-sidebar__category">
|
|
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
|
|
<h4 class="phpdocumentor-sidebar__root-namespace">
|
|
<a href="packages/Application.html" class="">Application</a>
|
|
</h4>
|
|
|
|
</section>
|
|
|
|
<section class="phpdocumentor-sidebar__category">
|
|
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
|
|
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
|
|
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
|
|
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
|
|
</section>
|
|
|
|
<section class="phpdocumentor-sidebar__category">
|
|
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
|
|
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
|
|
</section>
|
|
</aside>
|
|
|
|
<div class="phpdocumentor-column -eight phpdocumentor-content">
|
|
<ul class="phpdocumentor-breadcrumbs">
|
|
<li class="phpdocumentor-breadcrumb"><a href="namespaces/datatables.html">DataTables</a></li>
|
|
</ul>
|
|
|
|
<article class="phpdocumentor-element -class">
|
|
<h2 class="phpdocumentor-content__title">
|
|
Database
|
|
|
|
|
|
<div class="phpdocumentor-element__package">
|
|
in package
|
|
<ul class="phpdocumentor-breadcrumbs">
|
|
<li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
</h2>
|
|
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Database.php"><a href="files/database.html"><abbr title="Database.php">Database.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">32</span>
|
|
|
|
<a href="classes/DataTables-Database.html#source-view.32" class="phpdocumentor-element-found-in__source" data-line="32" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">DataTables Database connection object.</p>
|
|
|
|
<section class="phpdocumentor-description"><p>Create a database connection which may then have queries performed upon it.</p>
|
|
<p>This is a database abstraction class that can be used on multiple different
|
|
databases. As a result of this, it might not be suitable to perform complex
|
|
queries through this interface or vendor specific queries, but everything
|
|
required for basic database interaction is provided through the abstracted
|
|
methods.</p>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 id="toc">
|
|
Table of Contents
|
|
<a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h3>
|
|
|
|
<dl class="phpdocumentor-table-of-contents">
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Database.html#method___construct">__construct()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Database instance constructor.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Database.html#method_any">any()</a>
|
|
<span>
|
|
: bool </span>
|
|
</dt>
|
|
<dd>Determine if there is any data in the table that matches the query
|
|
condition</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Database.html#method_commit">commit()</a>
|
|
<span>
|
|
: self </span>
|
|
</dt>
|
|
<dd>Commit a database transaction.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Database.html#method_count">count()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Get a count from a table.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Database.html#method_debug">debug()</a>
|
|
<span>
|
|
: bool|self </span>
|
|
</dt>
|
|
<dd>Get / set debug mode.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Database.html#method_delete">delete()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Perform a delete query on a table.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Database.html#method_insert">insert()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Insert data into a table.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Database.html#method_push">push()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Update or Insert data. When doing an insert, the where condition is
|
|
added as a set field</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Database.html#method_query">query()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Create a query object to build a database query.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Database.html#method_quote">quote()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Quote a string for a quote. Note you should generally use a bind!</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Database.html#method_raw">raw()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Create a `Query` object that will execute a custom SQL query. This is
|
|
similar to the `sql` method, but in this case you must call the `exec()`
|
|
method of the returned `Query` object manually. This can be useful if you
|
|
wish to bind parameters using the query `bind` method to ensure data is
|
|
properly escaped.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Database.html#method_resource">resource()</a>
|
|
<span>
|
|
: resource </span>
|
|
</dt>
|
|
<dd>Get the database resource connector. This is typically a PDO object.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Database.html#method_rollback">rollback()</a>
|
|
<span>
|
|
: self </span>
|
|
</dt>
|
|
<dd>Rollback the database state to the start of the transaction.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Database.html#method_select">select()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Select data from a table.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Database.html#method_selectDistinct">selectDistinct()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Select distinct data from a table.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Database.html#method_sql">sql()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Execute an raw SQL query - i.e. give the method your own SQL, rather
|
|
than having the Database classes building it for you.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Database.html#method_transaction">transaction()</a>
|
|
<span>
|
|
: self </span>
|
|
</dt>
|
|
<dd>Start a new database transaction.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Database.html#method_type">type()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Get the database type (e.g. Postgres, Mysql, etc)</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Database.html#method_update">update()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Update data.</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<section class="phpdocumentor-methods">
|
|
<h3 class="phpdocumentor-elements__header" id="methods">
|
|
Methods
|
|
<a href="classes/DataTables-Database.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h3>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method___construct">
|
|
__construct()
|
|
<a href="classes/DataTables-Database.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Database.php"><a href="files/database.html"><abbr title="Database.php">Database.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">51</span>
|
|
|
|
<a href="classes/DataTables-Database.html#source-view.51" class="phpdocumentor-element-found-in__source" data-line="51" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Database instance constructor.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">__construct</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$opts</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>@param string[] $opts Array of connection parameters for the database:</p>
|
|
<pre class="prettyprint"><code class="language-php"> array(
|
|
"user" => "", // User name
|
|
"pass" => "", // Password
|
|
"host" => "", // Host name
|
|
"port" => "", // Port
|
|
"db" => "", // Database name
|
|
"type" => "" // Datable type: "Mysql", "Postgres" or "Sqlite"
|
|
)
|
|
</code></pre>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$opts</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_any">
|
|
any()
|
|
<a href="classes/DataTables-Database.html#method_any" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Database.php"><a href="files/database.html"><abbr title="Database.php">Database.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">98</span>
|
|
|
|
<a href="classes/DataTables-Database.html#source-view.98" class="phpdocumentor-element-found-in__source" data-line="98" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Determine if there is any data in the table that matches the query
|
|
condition</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">any</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string|array<string|int, string> </span><span class="phpdocumentor-signature__argument__name">$table</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed> </span><span class="phpdocumentor-signature__argument__name">$where</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
|
|
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$table</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string|array<string|int, string></span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Table name(s) to act upon.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$where</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed></span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Where condition for what to select - see Query->where().</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">bool</span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>Boolean flag - true if there were rows</p>
|
|
</section>
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_commit">
|
|
commit()
|
|
<a href="classes/DataTables-Database.html#method_commit" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Database.php"><a href="files/database.html"><abbr title="Database.php">Database.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">117</span>
|
|
|
|
<a href="classes/DataTables-Database.html#source-view.117" class="phpdocumentor-element-found-in__source" data-line="117" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Commit a database transaction.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">commit</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">self</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>Use with Database->transaction() and Database->rollback().</p>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">self</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_count">
|
|
count()
|
|
<a href="classes/DataTables-Database.html#method_count" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Database.php"><a href="files/database.html"><abbr title="Database.php">Database.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">132</span>
|
|
|
|
<a href="classes/DataTables-Database.html#source-view.132" class="phpdocumentor-element-found-in__source" data-line="132" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Get a count from a table.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">count</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$table</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$field</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">"id"</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$where</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>@param string|string[] $table Table name(s) to act upon.</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$table</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$field</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">"id"</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Primary key field name
|
|
@param array $where Where condition for what to select - see Query->where().
|
|
@return Number</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$where</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_debug">
|
|
debug()
|
|
<a href="classes/DataTables-Database.html#method_debug" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Database.php"><a href="files/database.html"><abbr title="Database.php">Database.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">152</span>
|
|
|
|
<a href="classes/DataTables-Database.html#source-view.152" class="phpdocumentor-element-found-in__source" data-line="152" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Get / set debug mode.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">debug</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$set</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool|self</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>@param boolean $_ Debug mode state. If not given, then used as a getter.</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$set</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">bool|self</span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>Debug mode state if no parameter is given, or
|
|
self if used as a setter.</p>
|
|
</section>
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_delete">
|
|
delete()
|
|
<a href="classes/DataTables-Database.html#method_delete" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Database.php"><a href="files/database.html"><abbr title="Database.php">Database.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">178</span>
|
|
|
|
<a href="classes/DataTables-Database.html#source-view.178" class="phpdocumentor-element-found-in__source" data-line="178" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Perform a delete query on a table.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">delete</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string|array<string|int, string> </span><span class="phpdocumentor-signature__argument__name">$table</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$where</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>This is a short cut method that creates an update query and then uses
|
|
the query('delete'), table, where and exec methods of the query.</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$table</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string|array<string|int, string></span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Table name(s) to act upon.
|
|
@param array $where Where condition for what to delete - see Query->where().
|
|
@return Result</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$where</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_insert">
|
|
insert()
|
|
<a href="classes/DataTables-Database.html#method_insert" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Database.php"><a href="files/database.html"><abbr title="Database.php">Database.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">201</span>
|
|
|
|
<a href="classes/DataTables-Database.html#source-view.201" class="phpdocumentor-element-found-in__source" data-line="201" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Insert data into a table.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">insert</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string|array<string|int, string> </span><span class="phpdocumentor-signature__argument__name">$table</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$set</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$pkey</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">''</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>This is a short cut method that creates an update query and then uses
|
|
the query('insert'), table, set and exec methods of the query.</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$table</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string|array<string|int, string></span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Table name(s) to act upon.
|
|
@param array $set Field names and values to set - see Query->set().
|
|
@param array $pkey Primary key column names (this is an array for
|
|
forwards compt, although only the first item in the array is actually
|
|
used). This doesn't need to be set, but it must be if you want to use
|
|
the <code class="prettyprint">Result->insertId()</code> method.
|
|
@return Result</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$set</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$pkey</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">''</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_push">
|
|
push()
|
|
<a href="classes/DataTables-Database.html#method_push" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Database.php"><a href="files/database.html"><abbr title="Database.php">Database.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">225</span>
|
|
|
|
<a href="classes/DataTables-Database.html#source-view.225" class="phpdocumentor-element-found-in__source" data-line="225" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Update or Insert data. When doing an insert, the where condition is
|
|
added as a set field</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">push</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$table</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed> </span><span class="phpdocumentor-signature__argument__name">$set</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$where</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$pkey</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">''</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>@param string|string[] $table Table name(s) to act upon.</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$table</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$set</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed></span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Field names and values to set - see Query->set().
|
|
@param array $where Where condition for what to update - see Query->where().
|
|
@param array $pkey Primary key column names (this is an array for
|
|
forwards compt, although only the first item in the array is actually
|
|
used). This doesn't need to be set, but it must be if you want to use
|
|
the <code class="prettyprint">Result->insertId()</code> method. Only used if an insert is performed.
|
|
@return Result</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$where</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$pkey</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">''</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_query">
|
|
query()
|
|
<a href="classes/DataTables-Database.html#method_query" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Database.php"><a href="files/database.html"><abbr title="Database.php">Database.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">257</span>
|
|
|
|
<a href="classes/DataTables-Database.html#source-view.257" class="phpdocumentor-element-found-in__source" data-line="257" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Create a query object to build a database query.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">query</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$type</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string|array<string|int, string> </span><span class="phpdocumentor-signature__argument__name">$table</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>@param string $type Query type - select, insert, update or delete.</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$type</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$table</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string|array<string|int, string></span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Table name(s) to act upon.
|
|
@return Query</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_quote">
|
|
quote()
|
|
<a href="classes/DataTables-Database.html#method_quote" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Database.php"><a href="files/database.html"><abbr title="Database.php">Database.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">269</span>
|
|
|
|
<a href="classes/DataTables-Database.html#source-view.269" class="phpdocumentor-element-found-in__source" data-line="269" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Quote a string for a quote. Note you should generally use a bind!</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">quote</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$val</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$type</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">PDO::PARAM_STR</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>@param string $val Value to quote</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$val</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$type</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">PDO::PARAM_STR</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Value type
|
|
@return string</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_raw">
|
|
raw()
|
|
<a href="classes/DataTables-Database.html#method_raw" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Database.php"><a href="files/database.html"><abbr title="Database.php">Database.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">293</span>
|
|
|
|
<a href="classes/DataTables-Database.html#source-view.293" class="phpdocumentor-element-found-in__source" data-line="293" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Create a `Query` object that will execute a custom SQL query. This is
|
|
similar to the `sql` method, but in this case you must call the `exec()`
|
|
method of the returned `Query` object manually. This can be useful if you
|
|
wish to bind parameters using the query `bind` method to ensure data is
|
|
properly escaped.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">raw</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>@return Result</p>
|
|
</section>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
|
Tags
|
|
<a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h5>
|
|
<dl class="phpdocumentor-tag-list">
|
|
<dt class="phpdocumentor-tag-list__entry">
|
|
<span class="phpdocumentor-tag__name">example</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-tag-list__definition">
|
|
|
|
<section class="phpdocumentor-description"><p>Safely escape user input</p>
|
|
<pre class="prettyprint"><code class="language-php">$db
|
|
->raw()
|
|
->bind( ':date', $_POST['date'] )
|
|
->exec( 'SELECT * FROM staff where date < :date' );
|
|
</code></pre>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_resource">
|
|
resource()
|
|
<a href="classes/DataTables-Database.html#method_resource" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Database.php"><a href="files/database.html"><abbr title="Database.php">Database.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">303</span>
|
|
|
|
<a href="classes/DataTables-Database.html#source-view.303" class="phpdocumentor-element-found-in__source" data-line="303" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Get the database resource connector. This is typically a PDO object.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">resource</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">resource</span></code>
|
|
|
|
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">resource</span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>PDO connection resource (driver dependent)</p>
|
|
</section>
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_rollback">
|
|
rollback()
|
|
<a href="classes/DataTables-Database.html#method_rollback" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Database.php"><a href="files/database.html"><abbr title="Database.php">Database.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">315</span>
|
|
|
|
<a href="classes/DataTables-Database.html#source-view.315" class="phpdocumentor-element-found-in__source" data-line="315" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Rollback the database state to the start of the transaction.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">rollback</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">self</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>Use with Database->transaction() and Database->commit().</p>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">self</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_select">
|
|
select()
|
|
<a href="classes/DataTables-Database.html#method_select" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Database.php"><a href="files/database.html"><abbr title="Database.php">Database.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">336</span>
|
|
|
|
<a href="classes/DataTables-Database.html#source-view.336" class="phpdocumentor-element-found-in__source" data-line="336" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Select data from a table.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">select</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string|array<string|int, string> </span><span class="phpdocumentor-signature__argument__name">$table</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$field</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">"*"</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$where</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$orderBy</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>This is a short cut method that creates an update query and then uses
|
|
the query('select'), table, get, where and exec methods of the query.</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$table</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string|array<string|int, string></span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Table name(s) to act upon.
|
|
@param array $field Fields to get from the table(s) - see Query->get().
|
|
@param array $where Where condition for what to select - see Query->where().
|
|
@param array $orderBy Order condition - see Query->order().
|
|
@return Result</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$field</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">"*"</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$where</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$orderBy</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_selectDistinct">
|
|
selectDistinct()
|
|
<a href="classes/DataTables-Database.html#method_selectDistinct" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Database.php"><a href="files/database.html"><abbr title="Database.php">Database.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">362</span>
|
|
|
|
<a href="classes/DataTables-Database.html#source-view.362" class="phpdocumentor-element-found-in__source" data-line="362" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Select distinct data from a table.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">selectDistinct</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string|array<string|int, string> </span><span class="phpdocumentor-signature__argument__name">$table</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$field</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">"*"</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$where</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$orderBy</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>This is a short cut method that creates an update query and then uses the
|
|
query('select'), distinct ,table, get, where and exec methods of the
|
|
query.</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$table</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string|array<string|int, string></span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Table name(s) to act upon.
|
|
@param array $field Fields to get from the table(s) - see Query->get().
|
|
@param array $where Where condition for what to select - see Query->where().
|
|
@param array $orderBy Order condition - see Query->order().
|
|
@return Result</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$field</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">"*"</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$where</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$orderBy</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_sql">
|
|
sql()
|
|
<a href="classes/DataTables-Database.html#method_sql" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Database.php"><a href="files/database.html"><abbr title="Database.php">Database.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">397</span>
|
|
|
|
<a href="classes/DataTables-Database.html#source-view.397" class="phpdocumentor-element-found-in__source" data-line="397" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Execute an raw SQL query - i.e. give the method your own SQL, rather
|
|
than having the Database classes building it for you.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">sql</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$sql</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>This method will execute the given SQL immediately. Use the <code class="prettyprint">raw()</code>
|
|
method if you need the ability to add bound parameters.</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$sql</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>SQL string to execute (only if _type is 'raw').
|
|
@return Result</p>
|
|
<p>@example
|
|
Basic select</p>
|
|
<pre class="prettyprint"><code class="language-php">$result = $db->sql( 'SELECT * FROM myTable;' );
|
|
</code></pre>
|
|
<p>@example
|
|
Set the character set of the connection</p>
|
|
<pre class="prettyprint"><code class="language-php">$db->sql("SET character_set_client=utf8");
|
|
$db->sql("SET character_set_connection=utf8");
|
|
$db->sql("SET character_set_results=utf8");
|
|
</code></pre>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_transaction">
|
|
transaction()
|
|
<a href="classes/DataTables-Database.html#method_transaction" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Database.php"><a href="files/database.html"><abbr title="Database.php">Database.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">410</span>
|
|
|
|
<a href="classes/DataTables-Database.html#source-view.410" class="phpdocumentor-element-found-in__source" data-line="410" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Start a new database transaction.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">transaction</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">self</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>Use with Database->commit() and Database->rollback().</p>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">self</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_type">
|
|
type()
|
|
<a href="classes/DataTables-Database.html#method_type" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Database.php"><a href="files/database.html"><abbr title="Database.php">Database.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">420</span>
|
|
|
|
<a href="classes/DataTables-Database.html#source-view.420" class="phpdocumentor-element-found-in__source" data-line="420" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Get the database type (e.g. Postgres, Mysql, etc)</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">type</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_update">
|
|
update()
|
|
<a href="classes/DataTables-Database.html#method_update" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Database.php"><a href="files/database.html"><abbr title="Database.php">Database.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">438</span>
|
|
|
|
<a href="classes/DataTables-Database.html#source-view.438" class="phpdocumentor-element-found-in__source" data-line="438" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Update data.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">update</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string|array<string|int, string> </span><span class="phpdocumentor-signature__argument__name">$table</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$set</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$where</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>This is a short cut method that creates an update query and then uses
|
|
the query('update'), table, set, where and exec methods of the query.</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$table</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string|array<string|int, string></span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Table name(s) to act upon.
|
|
@param array $set Field names and values to set - see Query->set().
|
|
@param array $where Where condition for what to update - see Query->where().
|
|
@return Result</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$set</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$where</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
</section>
|
|
|
|
<div class="phpdocumentor-modal" id="source-view">
|
|
<div class="phpdocumentor-modal-bg" data-exit-button></div>
|
|
<div class="phpdocumentor-modal-container">
|
|
<div class="phpdocumentor-modal-content">
|
|
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/Database.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
|
|
</div>
|
|
<button data-exit-button class="phpdocumentor-modal__close">X</button>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
function loadExternalCodeSnippets(line) {
|
|
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
|
|
var src = pre.getAttribute('data-src').replace( /\\/g, '/');
|
|
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
|
|
var language = 'php';
|
|
|
|
var code = document.createElement('code');
|
|
code.className = 'language-' + language;
|
|
|
|
pre.textContent = '';
|
|
|
|
pre.setAttribute('data-line', line)
|
|
code.textContent = 'Loading…';
|
|
|
|
pre.appendChild(code);
|
|
|
|
var xhr = new XMLHttpRequest();
|
|
|
|
xhr.open('GET', src, true);
|
|
|
|
xhr.onreadystatechange = function () {
|
|
if (xhr.readyState == 4) {
|
|
|
|
if (xhr.status < 400 && xhr.responseText) {
|
|
code.textContent = xhr.responseText;
|
|
|
|
Prism.highlightElement(code);
|
|
}
|
|
else if (xhr.status >= 400) {
|
|
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
|
|
}
|
|
else {
|
|
code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
|
|
}
|
|
}
|
|
};
|
|
|
|
xhr.send(null);
|
|
});
|
|
}
|
|
|
|
var modals = document.querySelectorAll("[data-modal]");
|
|
|
|
modals.forEach(function (trigger) {
|
|
trigger.addEventListener("click", function (event) {
|
|
//event.preventDefault();
|
|
const modal = document.getElementById(trigger.dataset.modal);
|
|
modal.classList.add("phpdocumentor-modal__open");
|
|
loadExternalCodeSnippets(trigger.dataset.line)
|
|
const exits = modal.querySelectorAll("[data-exit-button]");
|
|
exits.forEach(function (exit) {
|
|
exit.addEventListener("click", function (event) {
|
|
event.preventDefault();
|
|
modal.classList.remove("phpdocumentor-modal__open");
|
|
});
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
|
|
</article>
|
|
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
|
|
<section class="phpdocumentor-search-results__dialog">
|
|
<header class="phpdocumentor-search-results__header">
|
|
<h2 class="phpdocumentor-search-results__title">Search results</h2>
|
|
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
|
|
</header>
|
|
<section class="phpdocumentor-search-results__body">
|
|
<ul class="phpdocumentor-search-results__entries"></ul>
|
|
</section>
|
|
</section>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
<a href="classes/DataTables-Database.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
|
|
|
|
</main>
|
|
|
|
<script>
|
|
cssVars({});
|
|
</script>
|
|
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
|
|
</body>
|
|
</html>
|