Welcome Guest, Not a member yet? Register   Sign In
smart escape bug? in postgresql
#1

[eluser]gokure[/eluser]
Hi guys, sorry my english.

I don't known this isn't a truth bug, when I using $this->db->escape() method smart query a boolean values to database (Postgres 8.2), the code like as:
Code:
$this->db->get_where('users', array('deleted'=>FALSE));
And an error has occurred.
Quote:数据库错误

Error Number:

ERROR: operator does not exist: boolean = integer LINE 3: WHERE "deleted" = 0 ^ ��ʾ: No operator matches the given name and argument type(s). You may need to add explicit type casts.

SELECT * FROM "users" WHERE "deleted" = 0

This error occur all of the include escape() method. (insert/delete/update etc.)

I known the escape() method smart change the boolean value to 0 or 1 in the DB_driver.php file, but in the Postgres approved boolean aren't number 0 or 1, why don't using 'TRUE' or 'FALSE' act the boolean?
And this is a bug? I hope you can help me. Thank you.
#2

[eluser]gokure[/eluser]
So cold, I wait until the flowers have withered Sad




Theme © iAndrew 2016 - Forum software by © MyBB