Welcome Guest, Not a member yet? Register   Sign In
Using activerecords where clause with occasional 'OR' match
#1

[eluser]Andy UK[/eluser]
Hi guys,

I have a form that returns a value in a variable which is matched to a field in one of the database tables. The variable value is either '1' or '2' depending on the users choice. All pretty simple so far... I just use the following activerecord syntax:

$this->db->where('status', $variable);

What I want is to be able to have a third option for the user which returns fields that match either value, ie. '1' OR '2'.

Can someone help me with a simple way to do this? I tried passing the variable value of '*', but that doesn't seem to be acceptable.

Thanks!


Messages In This Thread
Using activerecords where clause with occasional 'OR' match - by El Forum - 05-04-2011, 03:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB