Re: Booleans - Mailing list pgsql-php

From Jascha Schubert
Subject Re: Booleans
Date
Msg-id 200211041838.56754.JTSMailing@gmx.net
Whole thread Raw
In response to Re: Booleans  (Keary Suska <hierophant@pcisys.net>)
Responses Re: Booleans
List pgsql-php
Am Monday 04 November 2002 18:27 schrieb Keary Suska:
> on 11/4/02 9:26 AM, scott.marlowe@ihs.com purportedly said:
> > To set your values, I'd suggest using the TRUE and FALSE method, like so:
> >
> > insert into table (a,b,c) values (TRUE,FALSE,FALSE)
> >
> > So that you use PHP to set each field to TRUE or FALSE (note there's no '
> > marks around the TRUE or FALSE).
>
> This would work only if the fields are boolean. Unfortunately, bit fields
> are a poor choice to store boolean values, and you don't get any real
> benefit from them.
>

I havent found any better yet... (i will try shortint next)

> You should also use proper bit string constant syntax, prefacing each value
> with "B":
>     insert into table (a,b,c) values (B'$a',B'$b',B'$c')


I would like to use the same queries for mysql and postgres. I don't think
mysql will handle with that.

pgsql-php by date:

Previous
From: Jascha Schubert
Date:
Subject: Re: Booleans
Next
From: Jascha Schubert
Date:
Subject: Quotes