CodeIgniter Forums
Multiple where clauses in getwhere - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Multiple where clauses in getwhere (/showthread.php?tid=4312)



Multiple where clauses in getwhere - El Forum - 11-17-2007

[eluser]RobbieL[/eluser]
Is it possible to have multiple where clauses in getwhere function? Or is it best to just use multiple where function instead?


Multiple where clauses in getwhere - El Forum - 11-17-2007

[eluser]Ryuuzaki92[/eluser]
Code:
$query = $this->db->getwhere('mytable', array('id' => $id), $limit, $offset);

pass the 2nd parameter as an array with all your where clauses.


Multiple where clauses in getwhere - El Forum - 11-17-2007

[eluser]RobbieL[/eluser]
That simple, huh? Big thanks Ryuuzaki92. Much appreciated. Smile


Multiple where clauses in getwhere - El Forum - 11-17-2007

[eluser]Ryuuzaki92[/eluser]
[quote author="RobbieL" date="1195332212"]That simple, huh? Big thanks Ryuuzaki92. Much appreciated. Smile[/quote]

np. read the user guide next time ;-P