Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

codeigniter get_where() function

I am using active record on an old codeigniter installation and I am running into problems executing multiple queries using the get_where function. for instance the following code

$this->db->get_Where('activation', array('email'=>'[email protected]'));
echo $this->db->last_query();
$this->db->get_Where('users', array('email'=>'[email protected]'));
echo $this->db->last_query();

the first query generates

SELECT * FROM (`activation`) WHERE `email` = '[email protected]'

the second one throws me for a loop and generates

SELECT * FROM (`activation`, `users`)
WHERE `email` = '[email protected]' AND `email` = '[email protected]'

Am i supposed to be clearing something?

like image 523
sola Avatar asked Nov 01 '22 22:11

sola


1 Answers

$this->db->get_Where('activation', array('email'=>'[email protected]'))->row();
like image 104
Aditya Lepcha Avatar answered Nov 09 '22 07:11

Aditya Lepcha