List:General Discussion« Previous MessageNext Message »
From:Russ Davies Date:February 6 2001 9:59pm
Subject:Re: Boolean Datatype
View as plain text  
When a True data type is passed in from ASP, the resultant SQL command will
look like this :
INSERT INTO tableName (fieldName) VALUES (True);
Not this :
INSERT INTO tableName (fieldName) VALUES ('True');

So produces an error as the value is not enclosed in quotes, which it would
need to be for an ENUM data type?

Russ Davies

----- Original Message -----
From: "Vivek Khera" <khera@stripped>
To: <mysql@stripped>
Sent: Tuesday, February 06, 2001 9:09 PM
Subject: Re: Boolean Datatype


> >>>>> "RD" == Russ Davies <russ@stripped> writes:
>
> RD> Thanks for the suggestion, but this would still mean converting the
data
> RD> type from within ASP (the 'True' type) down to a char ('T') would it
not?
>
> then use
>
>  ENUM('False','True')
>
> instead.  Enum can have any string you want.  I personally prefer to
> use the order False, True since then it also has the numeric values 0
> and 1.
>
> >> CREATE TABLE logInfo2
> >> (
> >> logID           INT NOT NULL UNIQUE,
> >> ipAddress       VARCHAR(20) NOT NULL DEFAULT 'None',
> >> boolVars        ENUM ('T', 'F') DEFAULT 'F'
> >> )
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <mysql-thread64403@stripped>
> To unsubscribe, e-mail <mysql-unsubscribe-russ=russd.com@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>

Thread
Boolean DatatypeRuss Davies6 Feb
RE: Boolean DatatypeChris M. Oson6 Feb
  • Re: Boolean DatatypeRuss Davies6 Feb
    • Re: Boolean DatatypeVivek Khera6 Feb
    • RE: Boolean DatatypeRoger Ramirez6 Feb
  • Re: Boolean DatatypeRuss Davies6 Feb
RE: Boolean DatatypeChris M. Oson6 Feb
  • Re: Boolean DatatypeRuss Davies6 Feb
  • Re: Boolean DatatypeMatt Friedman6 Feb
  • Re: Boolean DatatypeRuss Davies6 Feb
  • Re: Boolean DatatypeGregg Housh6 Feb
  • Re: Boolean DatatypeRolf Hopkins7 Feb
Re: Boolean Datatypebtjones6 Feb
Re: Boolean DatatypeGregg Housh6 Feb
Antwort: Boolean Datatypealexander.skwar7 Feb