Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 2453D47659D for ; Mon, 4 Nov 2002 12:27:15 -0500 (EST) Received: from krusty.pcisys.net (krusty.pcisys.net [216.229.32.178]) by postgresql.org (Postfix) with ESMTP id D9A0E476489 for ; Mon, 4 Nov 2002 12:27:05 -0500 (EST) Received: from [216.229.45.5] (moe.rbe45-5.cos.pcisys.net [216.229.45.5]) by krusty.pcisys.net (8.12.5/8.12.5) with ESMTP id gA4HRANG023847 for ; Mon, 4 Nov 2002 10:27:10 -0700 (MST) User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.0.4 Date: Mon, 04 Nov 2002 10:27:10 -0700 Subject: Re: Booleans From: Keary Suska To: Postgres-PHP Message-ID: In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/6 X-Sequence-Number: 1588 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. You will have to force PHP to convert your values into a number, such as $a = $a|0 or $a = number_format( $a ) or use the workaround mentioned in your original email. 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') Keary Suska Esoteritech, Inc. "Leveraging Open Source for a better Internet"