Welcome Guest, Not a member yet? Register   Sign In
How do I write this SQL statement ?
#1

[eluser]Unknown[/eluser]
Hi everyone,

I have this SQL statement :

Select * from `abc_table` abc
where abc.field1 = 1 and
(
abc.field2 = 2 and
(abc.field = 3 or abc.field4 = 4)
);

If don't use $this->db->query() statement, how do I write this statement (by $this->db->where...)

Thanks for helping.


Messages In This Thread
How do I write this SQL statement ? - by El Forum - 02-16-2009, 10:41 PM
How do I write this SQL statement ? - by El Forum - 02-17-2009, 12:32 AM
How do I write this SQL statement ? - by El Forum - 02-17-2009, 09:51 AM
How do I write this SQL statement ? - by El Forum - 02-17-2009, 03:51 PM
How do I write this SQL statement ? - by El Forum - 02-17-2009, 03:55 PM
How do I write this SQL statement ? - by El Forum - 02-17-2009, 03:57 PM
How do I write this SQL statement ? - by El Forum - 02-18-2009, 03:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB