Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 16621475E2B for ; Mon, 4 Nov 2002 12:38:24 -0500 (EST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by postgresql.org (Postfix) with SMTP id 859B347580B for ; Mon, 4 Nov 2002 12:38:22 -0500 (EST) Received: (qmail 31459 invoked by uid 0); 4 Nov 2002 17:38:24 -0000 Received: from pd9e1570f.dip.t-dialin.net (HELO teslaVM.zeggnet.de) (217.225.87.15) by mail.gmx.net (mp010-rz3) with SMTP; 4 Nov 2002 17:38:24 -0000 From: Jascha Schubert To: Keary Suska , Postgres-PHP Subject: Re: Booleans Date: Mon, 4 Nov 2002 18:38:56 +0100 User-Agent: KMail/1.5 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200211041838.56754.JTSMailing@gmx.net> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/8 X-Sequence-Number: 1590 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.