summaryrefslogtreecommitdiffstats
path: root/user_guide/database/queries.html
diff options
context:
space:
mode:
authorDerek Allard <derek.allard@ellislab.com>2007-07-05 01:54:32 +0200
committerDerek Allard <derek.allard@ellislab.com>2007-07-05 01:54:32 +0200
commitc644128fdd49a47d791240e0e38b54cd22412bc5 (patch)
treefd2135d295c103395f5d0bd89056b0e798cfcdb3 /user_guide/database/queries.html
parent691010e72ec7fb4a05740332a10b5f046a82c666 (diff)
fixed validation errors... about a zillion of em.
Diffstat (limited to 'user_guide/database/queries.html')
-rw-r--r--user_guide/database/queries.html8
1 files changed, 3 insertions, 5 deletions
diff --git a/user_guide/database/queries.html b/user_guide/database/queries.html
index e55a5328a..013d64f33 100644
--- a/user_guide/database/queries.html
+++ b/user_guide/database/queries.html
@@ -95,15 +95,13 @@ CodeIgniter has two functions that help you do this:</p>
<li><strong>$this->db->escape()</strong> This function determines the data type so that it
can escape only string data. It also automatically adds single quotes around the data so you don't have to:
-<code>$sql = "INSERT INTO table (title) VALUES(".$this->db->escape($title).")";</code>
+<code>$sql = "INSERT INTO table (title) VALUES(".$this->db->escape($title).")";</code></li>
<li><strong>$this->db->escape_str()</strong> This function escapes the data passed to it, regardless of type.
Most of the time you'll use the above function rather then this one. Use the function like this:
-<code>$sql = "INSERT INTO table (title) VALUES('".$this->db->escape_str($title)."')";</code>
-
-</li>
+<code>$sql = "INSERT INTO table (title) VALUES('".$this->db->escape_str($title)."')";</code></li>
</ol>
@@ -134,7 +132,7 @@ Previous Topic:&nbsp;&nbsp;<a href="connecting.html">Connecting to your Database
<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
Next Topic:&nbsp;&nbsp;<a href="results.html">Query Results</a>
-<p>
+</p>
<p><a href="http://www.codeigniter.com">CodeIgniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2007 &nbsp;&middot;&nbsp; <a href="http://ellislab.com/">Ellislab, Inc.</a></p>
</div>