pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jascha Schubert <JTSMailing@gmx.net>
To: Keary Suska <hierophant@pcisys.net>
To: Postgres-PHP <pgsql-php@postgresql.org>
Subject: Re: Booleans
Date: Mon, 4 Nov 2002 18:38:56 +0100
Message-ID: <200211041838.56754.JTSMailing@gmx.net> (raw)
In-Reply-To: <B9EBFBFE.14F7B%hierophant@pcisys.net>
References: <B9EBFBFE.14F7B%hierophant@pcisys.net>

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.



view thread (6+ messages)  latest in thread

Message-ID: <200211041838.56754.JTSMailing@gmx.net>
Permalink:  ../200211041838.56754.JTSMailing@gmx.net/
Also on:    postgresql.org/message-id/200211041838.56754.JTSMailing@gmx.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: JTSMailing@gmx.net, hierophant@pcisys.net
  Subject: Re: Booleans
  In-Reply-To: <200211041838.56754.JTSMailing@gmx.net>
  References: <B9EBFBFE.14F7B%hierophant@pcisys.net> <200211041838.56754.JTSMailing@gmx.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox