Re: [GENERAL] PHP and PostgreSQL boolean data type

2010-02-11 Thread Torsten Zühlsdorff
Thom Brown schrieb: A long-standing problem we've had with PostgreSQL queries in PHP is that the returned data for boolean columns is the string 'f' instead of the native boolean value of false. This problem is solved since nearly 5 years with PDO. You can use an abstraction like DDDBL (see m

Re: [GENERAL] PHP and PostgreSQL boolean data type

2010-02-10 Thread Torsten Zühlsdorff
Thom Brown schrieb: A long-standing problem we've had with PostgreSQL queries in PHP is that the returned data for boolean columns is the string 'f' instead of the native boolean value of false. This problem is solved since nearly 5 years with PDO. You can use an abstraction like DDDBL (see my

Re: [GENERAL] PHP and PostgreSQL boolean data type

2010-02-10 Thread Thom Brown
On 10 February 2010 12:11, A. Kretschmer wrote: > In response to Thom Brown : >> Hi, >> >> A long-standing problem we've had with PostgreSQL queries in PHP is >> that the returned data for boolean columns is the string 'f' instead >> of the native boolean value of false. > > http://andreas.scherba

Re: [GENERAL] PHP and PostgreSQL boolean data type

2010-02-10 Thread Tommy Gildseth
Thom Brown wrote: Is this a limitation of libpq or a flawed implementation in the php library? And if this is just the case for backwards-compatibility, is there a way to switch it to a more sensible PHP data type? Using PDO(http://no.php.net/pdo) will at least give you native values for tru

Re: [GENERAL] PHP and PostgreSQL boolean data type

2010-02-10 Thread A. Kretschmer
In response to Thom Brown : > Hi, > > A long-standing problem we've had with PostgreSQL queries in PHP is > that the returned data for boolean columns is the string 'f' instead > of the native boolean value of false. http://andreas.scherbaum.la/blog/archives/302-BOOLEAN-datatype-with-PHP-compatib

[GENERAL] PHP and PostgreSQL boolean data type

2010-02-10 Thread Thom Brown
Hi, A long-standing problem we've had with PostgreSQL queries in PHP is that the returned data for boolean columns is the string 'f' instead of the native boolean value of false. An obvious example of this would be for a table with users and their boolean registered status: Select user, register