From 0b18634e32efbafb83746c123b7d058b1570a01d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 31 May 2014 20:29:09 +0300 Subject: Changelog messages, bump year in copyright notices --- user_guide/database/queries.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'user_guide/database/queries.html') diff --git a/user_guide/database/queries.html b/user_guide/database/queries.html index c1495bb0b..83d79550b 100644 --- a/user_guide/database/queries.html +++ b/user_guide/database/queries.html @@ -95,6 +95,8 @@ $this->db->dbprefix('tablename');

In many databases it is advisable to protect table and field names - for example with backticks in MySQL. Active Record queries are automatically protected, however if you need to manually protect an identifier you can use:

$this->db->protect_identifiers('table_name');

+

Although Active Record will try its best to properly quote any field and table names that you feed it, note that it is NOT designed to work with arbitrary user input. DO NOT feed it with unsanitized user data.

+

This function will also add a table prefix to your table, assuming you have a prefix specified in your database config file. To enable the prefixing set TRUE (boolen) via the second parameter:

$this->db->protect_identifiers('table_name', TRUE);

@@ -151,7 +153,7 @@ Previous Topic:  Connecting to your Database User Guide Home   ·   Next Topic:  Query Results

-

CodeIgniter  ·  Copyright © 2006 - 2012  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2014  ·  EllisLab, Inc.

-- cgit v1.2.3-24-g4f1b