Re: [SQL] booleans
От | Jose' Soares |
---|---|
Тема | Re: [SQL] booleans |
Дата | |
Msg-id | 36891123.EAA8C743@sferacarta.com обсуждение исходный текст |
Ответ на | booleans (Gregory Holston <holston@itd.nrl.navy.mil>) |
Ответы |
Re: [SQL] booleans
|
Список | pgsql-sql |
Gregory Holston wrote: > > Good day all, > > I just wrote an HTML form with a PHP script to enter data into a table > witha boolean field. When I pressed enter it returned the following error > "Warning: PostgresSQL query failed: ERROR: Bad boolean external > representation". The script is as follows: > > if( $id ) { > pg_Exec($conn, "INSERT into authors > VALUES ('$pubrelease', '$id', '$first');"); > } > > I would appreciate any help. > Postgres supports bool as the SQL3 boolean type. bool can have one of only two states: 'true' or 'false'. Boolean accepts only one of the following values: True: 't', TRUE, 't', 'true', 'y', 'yes', '1' False: 'f', FALSE, 'f', 'false', 'n', 'no', '0' - Note that you have to enclose data between '' except for words TRUE/FALSE. Probably you are trying to insert data in a different way. -Jose'-
В списке pgsql-sql по дате отправления: