www.webdeveloper.com
Results 1 to 4 of 4

Thread: Is there a datatype boolean?, if not ...

  1. #1
    Join Date
    Mar 2010
    Posts
    281

    Is there a datatype boolean?, if not ...

    Hi,
    I'd like a column to have a value of either true or false but i'm thinking there is no such thing, no such data type (....and why not?!)

    if there isn't what's a good alternative?, tiny int?, or i'll just use text reading true or false,

  2. #2
    Join Date
    Mar 2012
    Posts
    1,498
    Read the manual.

  3. #3
    Join Date
    Dec 2005
    Posts
    2,984
    Quote Originally Posted by jedaisoul View Post
    Read the manual.
    This question is in regard to SQL, not PHP - I don't know why you posted a link to the PHP manual.

    Fortunately, there is a boolean data type in MySQL, it's a numeric data type. Basically a non zero value is true and 0 is false. Check the MySQL documentation: http://dev.mysql.com/doc/refman/5.5/...-overview.html
    I've switched careers...
    I'm NO LONGER a scientist,
    but now a web developer...
    awesome.

  4. #4
    Join Date
    Mar 2010
    Posts
    281
    Perfect, thank you

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles