[eluser]InterMedio[/eluser]
[quote author="WanWizard" date="1337591018"]Codeigniter doesn't have a native ORM, it has a query builder (called active record in versions up to 2.1.0).
You need a syntax like
Code:
$this->db->where('SUBSTRING_INDEX(SUBSTRING_INDEX(user_data, '\"', 4) , '\"', -1)', $user_id, FALSE);
[/quote]
This query doesn't work.
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 '2 AND `id` = '2'' at line 1
Code:
UPDATE `users` SET `location` = 'Profile' WHERE SUBSTRING_INDEX(SUBSTRING_INDEX(user_data, '"', 4) , '"', -1)2 AND `id` = '2'
I also used this syntax
Code:
$this->db->where("SUBSTRING_INDEX(SUBSTRING_INDEX(user_data, '\"', 4) , '\"', -1)", $user_id, FALSE);
but don't have any positive results.