Welcome Guest, Not a member yet? Register   Sign In
ActiveRecord set/update/select not escaping
#1

[eluser]phazei[/eluser]
I’m using CI1.7.1 and both
$data = array(.....)
->set($data) and ->update(‘table’,$data)
do not escape the col names with backticks.

Is this just me or has anyone else noticed this?

I noticed because I have a new table with a column named `limit`.



There is also a strange issue with select.
I have a model that has:
$this->db->select('limit');
in a method.

This is what happens if I call it twice, it echos last_query() in the model:

Starting First Call
SELECT `limit` FROM (`user_profile`) WHERE `user_id` = '1'
Starting Second Call
A Database Error Occurred

Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'limit FROM (user_profile) WHERE `user_id` = '1'' at line 1

SELECT limit FROM (user_profile) WHERE `user_id` = '1'


Messages In This Thread
ActiveRecord set/update/select not escaping - by El Forum - 03-25-2009, 08:40 PM
ActiveRecord set/update/select not escaping - by El Forum - 02-25-2011, 02:45 AM
ActiveRecord set/update/select not escaping - by El Forum - 02-25-2011, 04:40 AM
ActiveRecord set/update/select not escaping - by El Forum - 02-25-2011, 11:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB