Welcome Guest, Not a member yet? Register   Sign In
How to use TRUE/FALSE values in an Active Record statement?
#1

[eluser]xcristi[/eluser]
Hi guys,

So, I have one postgresql table with a boolean type field (mn_active).
And I have a need for a statement who take care of that field, something as:
Code:
$q = $CI->db->getwhere('menu', array('mn_menu' => 2, 'mn_active' => true));

The error looks like:

Code:
ERROR: operator does not exist: boolean = integer HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.

SELECT * FROM menu WHERE mn_menu = 1 AND mn_active = 1

So, how can I use boolean values (true / false) instead of integers ?
Thanks.


Messages In This Thread
How to use TRUE/FALSE values in an Active Record statement? - by El Forum - 09-03-2007, 02:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB