Welcome Guest, Not a member yet? Register   Sign In
CI 1.7.2 $this->db->like() issue?
#1

[eluser]Mr. Fulop[/eluser]
Hi everyone.
I have an issue when using like from active record.
Code:
$domeniu = 'whatever';

$this->db->set('field','1');
$this->db->like('other_field', $domeniu);
$this->db->limit(1);
$this->db->update('table');
The above produces:
Code:
UPDATE `table` SET `field` = '1' LIMIT 1;

While the following query works fine and it is what I want:
Code:
$this->db->query("update table set field='1' where other_field like '%$domeniu%' limit 1");

Am I missing something?

Cheers,
Alex


Messages In This Thread
CI 1.7.2 $this->db->like() issue? - by El Forum - 12-17-2009, 01:47 AM
CI 1.7.2 $this->db->like() issue? - by El Forum - 12-17-2009, 04:16 AM
CI 1.7.2 $this->db->like() issue? - by El Forum - 12-17-2009, 06:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB