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

[eluser]Nick_MyShuitings[/eluser]
[quote author="Andy UK" date="1304718314"]Thanks!


Code:
$this->db->where("status", 1);
$this->db->or_where("status", 1);

[/quote]

Wait... what??? when the user chooses "one" you are executing this SQL "... WHERE status = 1 OR status = 1" .... WHY???

STOP F-ING using Active Record if your brain can handle SQL! It leads to silly things like this.

[EDIT] Ignore this rant... I see you posted those first options of examples of what would not work due to the post format of your form [/EDIT]


Messages In This Thread
Using activerecords where clause with occasional 'OR' match - by El Forum - 05-07-2011, 07:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB