Code:
UPDATE table_name
SET subjectcombination = JSON_REPLACE(subjectcombination, '$.subjectcombination[0].college', 'ABC')
WHERE id = 10;
How do can I build
json_replace
in CI4?!
thanks.
Code:
$builder = $this->db->table('users');
$builder->where('id', 2)->set('information', "JSON_REPLACE(information, '$.settings[0].social-enable', '0')", false) ;
$builder->update();
In action I see this error:
Code:
Invalid JSON path expression. The error is around character position 27.
(03-06-2022, 02:46 AM)
iRedds Wrote:
$.settings[0].social-enable = {"settings" : [ { "social-enable" : 1} ]}
@
iRedds
: I change to this but I see same error: