Re: PHP and PostgreSQL boolean data type

From: Thom Brown <thombrown(at)gmail(dot)com>
To: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PHP and PostgreSQL boolean data type
Date: 2010-02-10 12:44:35
Message-ID: bddc86151002100444j672c724al1851994550f74823@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-php

On 10 February 2010 12:11, A. Kretschmer
<andreas(dot)kretschmer(at)schollglas(dot)com> 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.scherbaum.la/blog/archives/302-BOOLEAN-datatype-with-PHP-compatible-output.html
>

Thanks guys. I can see that this is specifically a PHP issue then.
It seems like an extreme workaround though. I'd rather see the PHP
library updated in a way that would somehow not break existing code
which checked for an 'f'. Not quite sure what the solution would be.

Thanks

Thom

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Howard Cole 2010-02-10 13:03:47 Large Objects: Sizeof and Deleting Unlinked LOs
Previous Message Carsten Kropf 2010-02-10 12:17:37 Re: Extending SQL in C using VARIABLE length type

Browse pgsql-php by date

  From Date Subject
Next Message Torsten Zühlsdorff 2010-02-10 14:15:18 Re: PHP and PostgreSQL boolean data type
Previous Message Tommy Gildseth 2010-02-10 12:13:22 Re: PHP and PostgreSQL boolean data type