Re: Booleans

From: Jascha Schubert <JTSMailing(at)gmx(dot)net>
To: Keary Suska <hierophant(at)pcisys(dot)net>, Postgres-PHP <pgsql-php(at)postgresql(dot)org>
Subject: Re: Booleans
Date: 2002-11-04 17:38:56
Message-ID: 200211041838.56754.JTSMailing@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

Am Monday 04 November 2002 18:27 schrieb Keary Suska:
> on 11/4/02 9:26 AM, scott(dot)marlowe(at)ihs(dot)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.

In response to

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Jascha Schubert 2002-11-04 18:05:36 Quotes
Previous Message Jascha Schubert 2002-11-04 17:35:24 Re: Booleans