CodeIgniter Forums
2 variables in where clause? - 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: 2 variables in where clause? (/showthread.php?tid=47830)



2 variables in where clause? - El Forum - 12-23-2011

[eluser]Samus[/eluser]
Is it possible to pass 2 arguements as variables in the where clause?

e.g

$this->db->where($var1, $var2);

So effectively. Where $var1 is equal to $var2

Is this possible? It keeps producing a query along the lines of.

'where `0` = $var1 and `1` = $var2'

Anyone help please.