CodeIgniter Forums

Full Version: 2 variables in where clause?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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.