Permalink
Browse files

Minor layout update

  • Loading branch information...
stefangabos committed Jan 30, 2019
1 parent f0c3c5f commit 4eedd4a74e8df9bbf08e0a86dcb9b1fb167a1a94
Showing with 23 additions and 9 deletions.
  1. +14 −7 docs/Zebra_Database/Zebra_Database.html
  2. +1 −1 docs/elementindex_Zebra_Database.html
  3. +1 −1 docs/index.html
  4. +7 −0 docs/media/style.css
@@ -655,7 +655,7 @@ <h5>Tags:</h5>
<div class="clear"></div>
</div>
<a name="method__destruct"></a>
<h4 class="method"><span><em>destructor</em></span> __destruct() <span class="smalllinenumber">[line 5103]</span></h4>
<h4 class="method"><span><em>destructor</em></span> __destruct() <span class="smalllinenumber">[line 5110]</span></h4>
<div class="doc_block">
<p class="code">
<em>void</em>
@@ -2271,9 +2271,9 @@ <h4 class="method"><span><em>method</em></span> insert_update() <span class="sma
)
</p>
<p><div class="highlight">This method is deprecated since 2.12.0 and will be removed in 3.0. Please use the <a href="../Zebra_Database/Zebra_Database.html#methodinsert_bulk">insert_bulk()</a> method.</div></p>
<p>When using this method, if a row is inserted that would cause a duplicate value in a UNIQUE index or PRIMARY KEY, an UPDATE of the old row is performed.</p><p>Read more <a href="http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html">here</a>.</p><p>When using this method, column names will be enclosed in grave accents &quot; ` &quot; (thus, allowing seamless usage of reserved words as column names) and values will be automatically <a href="../Zebra_Database/Zebra_Database.html#methodescape">escape()</a>d in order to prevent SQL injections.</p><p><ol class="code"><li><div class="src-line"><span class="src-comm">//&nbsp;presuming&nbsp;article_id&nbsp;is&nbsp;a&nbsp;UNIQUE&nbsp;index&nbsp;or&nbsp;PRIMARY&nbsp;KEY,&nbsp;the&nbsp;statement&nbsp;below&nbsp;will&nbsp;insert&nbsp;a&nbsp;new&nbsp;row&nbsp;for&nbsp;given</span></div></li>
<li><div class="src-line"><span class="src-comm">//&nbsp;$article_id&nbsp;and&nbsp;set&nbsp;the&nbsp;&quot;votes&quot;&nbsp;to&nbsp;0.&nbsp;But,&nbsp;if&nbsp;$article_id&nbsp;is&nbsp;already&nbsp;in&nbsp;the&nbsp;database,&nbsp;increment&nbsp;the&nbsp;votes'</span></div></li>
<li><div class="src-line"><span class="src-comm">//&nbsp;numbers.</span></div></li>
<p>When using this method, if a row is inserted that would cause a duplicate value in a UNIQUE index or PRIMARY KEY, an UPDATE of the old row is performed.</p><p>Read more <a href="http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html">here</a>.</p><p>When using this method, column names will be enclosed in grave accents &quot; ` &quot; (thus, allowing seamless usage of reserved words as column names) and values will be automatically <a href="../Zebra_Database/Zebra_Database.html#methodescape">escape()</a>d in order to prevent SQL injections.</p><p><ol class="code"><li><div class="src-line"><span class="src-comm">//&nbsp;presuming&nbsp;article_id&nbsp;is&nbsp;a&nbsp;UNIQUE&nbsp;index&nbsp;or&nbsp;PRIMARY&nbsp;KEY,&nbsp;the&nbsp;statement&nbsp;below&nbsp;will</span></div></li>
<li><div class="src-line"><span class="src-comm">//&nbsp;insert&nbsp;a&nbsp;new&nbsp;row&nbsp;for&nbsp;given&nbsp;$article_id&nbsp;and&nbsp;set&nbsp;the&nbsp;&quot;votes&quot;&nbsp;to&nbsp;0.&nbsp;But,&nbsp;if&nbsp;$article_id</span></div></li>
<li><div class="src-line"><span class="src-comm">//&nbsp;is&nbsp;already&nbsp;in&nbsp;the&nbsp;database,&nbsp;increment&nbsp;the&nbsp;votes'&nbsp;numbers.</span></div></li>
<li><div class="src-line"><span class="src-comm">//&nbsp;also&nbsp;notice&nbsp;that&nbsp;we're&nbsp;using&nbsp;a&nbsp;MySQL&nbsp;function&nbsp;as&nbsp;a&nbsp;value</span></div></li>
<li><div class="src-line"><span class="src-var">$db</span><span class="src-sym">-&gt;</span><a href="../Zebra_Database/Zebra_Database.html#methodinsert_update">insert_update</a><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'table'</span><span class="src-sym">,</span></div></li>
@@ -3123,7 +3123,7 @@ <h5>Parameters:</h5>
<div class="clear"></div>
</div>
<a name="methodupdate"></a>
<h4 class="method"><span><em>method</em></span> update() <span class="smalllinenumber">[line 3985]</span></h4>
<h4 class="method"><span><em>method</em></span> update() <span class="smalllinenumber">[line 3992]</span></h4>
<div class="doc_block">
<p class="code">
<em>boolean</em>
@@ -3216,7 +3216,14 @@ <h5>Parameters:</h5>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$criteria</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line"><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol><p>...is equivalent to</p><p><ol class="code"><li><div class="src-line"><span class="src-var">$db</span><span class="src-sym">-&gt;</span><a href="../Zebra_Database/Zebra_Database.html#methodquery">query</a><span class="src-sym">(</span><span class="src-str">'UPDATE&nbsp;table&nbsp;SET&nbsp;column&nbsp;=&nbsp;column&nbsp;+&nbsp;?&nbsp;WHERE&nbsp;criteria&nbsp;=&nbsp;?'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">,&nbsp;</span><span class="src-var">$criteria</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
</ol><p>...is equivalent to</p><p><ol class="code"><li><div class="src-line"><span class="src-var">$db</span><span class="src-sym">-&gt;</span><a href="../Zebra_Database/Zebra_Database.html#methodquery">query</a><span class="src-sym">(</span><span class="src-str">'</span></div></li>
<li><div class="src-line"><span class="src-str">&nbsp;&nbsp;&nbsp;&nbsp;UPDATE</span></div></li>
<li><div class="src-line"><span class="src-str">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;table</span></div></li>
<li><div class="src-line"><span class="src-str">&nbsp;&nbsp;&nbsp;&nbsp;SET</span></div></li>
<li><div class="src-line"><span class="src-str">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;column&nbsp;=&nbsp;column&nbsp;+&nbsp;?</span></div></li>
<li><div class="src-line"><span class="src-str">&nbsp;&nbsp;&nbsp;&nbsp;WHERE</span></div></li>
<li><div class="src-line"><span class="src-str">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;criteria&nbsp;=&nbsp;?</span></div></li>
<li><div class="src-line"><span class="src-str">'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">,&nbsp;</span><span class="src-var">$criteria</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
</ol><p>You may also use any of <a href="http://www.techonthenet.com/mysql/functions/">MySQL's functions</a> as <em>values</em>.</p><p><div class="highlight">Be aware that when using MySQL functions, the value will be used as it is
without being escaped! While this is ok when using a function without any arguments
like NOW(), this may pose a security concern if the argument(s) come from user input.
@@ -3247,7 +3254,7 @@ <h5>Parameters:</h5>
</tr>
</table>
<div id="doc_footer">
Documentation generated on <span>Tue, 29 Jan 19</span> by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on <span>Wed, 30 Jan 19</span> by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</div>
<!-- Global site tag (gtag.js) - Google Analytics -->
@@ -360,7 +360,7 @@ <h3>z</h3>
</tr>
</table>
<div id="doc_footer">
Documentation generated on <span>Tue, 29 Jan 19</span> by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on <span>Wed, 30 Jan 19</span> by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</div>
<!-- Global site tag (gtag.js) - Google Analytics -->
@@ -47,7 +47,7 @@ <h2>Zebra_Database - a compact, lightweight and feature-rich PHP MySQLi database
</tr>
</table>
<div id="doc_footer">
Documentation generated on <span>Tue, 29 Jan 19</span> by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on <span>Wed, 30 Jan 19</span> by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</div>
<!-- Global site tag (gtag.js) - Google Analytics -->
@@ -25,6 +25,8 @@ h6 {
#phpdoc {
min-height: calc(100% - 95px);
height: calc(100% - 95px);
width: 991px;
margin: 0 auto;
}

#phpdoc > table {
@@ -65,6 +67,7 @@ h6 {

.sidebar {
background: #fafbfc;
border-left: 1px solid #e1e4e8;
border-right: 1px solid #e1e4e8;
border-bottom: 1px solid #e1e4e8;
white-space: nowrap;
@@ -120,6 +123,10 @@ h4.method span {
margin-bottom: 0;
}

.doc_block li ul {
list-style-type: none;
}

.doc_block table td {
padding: .5em;
}

0 comments on commit 4eedd4a

Please sign in to comment.