SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Boolean in MySQL?

    Hi all. My hosting company is running MySql 3.22.32 with phpMyAdmin for administrating. When I go to add a new field, there's no BOOLEAN option. I've never noticed this before as I haven't needed one and I usually use SQL Server at work (this is a private job).

    Does this version of MySQL even support true boolean or is it phpMyAdmin that's at fault and if I run the appropriate query it will work anyway...?

    G

  2. #2
    SitePoint Enthusiast petersj's Avatar
    Join Date
    Aug 2002
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No MySQL does not have a BOOLEAN column type. You can use tinyint or BOOL, synonyms for CHAR(1).

  3. #3
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cool. That's fine anyway. I guess SQL Server has 'BIT' instead which only takes 1 or 0. Much the same.

    Thanks a lot!

    G


Bookmarks

Posting Permissions

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