Welcome Guest, Not a member yet? Register   Sign In
How to Force Code Igniter to NOT to excape queries?
#2

[eluser]Georgi Veznev[/eluser]
Code:
$this->db->select() accepts an optional second parameter. If you set it to FALSE, CodeIgniter will not try to protect your field or table names with backticks. This is useful if you need a compound select statement.

$this->db->select('(SELECT SUM(payments.amount) FROM payments WHERE payments.invoice_id=4') AS amount_paid', FALSE);
$query = $this->db->get('mytable');


Messages In This Thread
How to Force Code Igniter to NOT to excape queries? - by El Forum - 02-05-2010, 08:38 AM
How to Force Code Igniter to NOT to excape queries? - by El Forum - 02-05-2010, 08:50 AM
How to Force Code Igniter to NOT to excape queries? - by El Forum - 02-05-2010, 08:54 AM
How to Force Code Igniter to NOT to excape queries? - by El Forum - 02-05-2010, 09:10 AM
How to Force Code Igniter to NOT to excape queries? - by El Forum - 02-05-2010, 11:07 PM
How to Force Code Igniter to NOT to excape queries? - by El Forum - 02-06-2010, 01:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB