Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2003

    Unanswered: Adding checkbox to mysql database

    i currently have the following database setup:

    create table Players
    ( PlayerID integer not null primary key auto_increment
    , Forename varchar(50)
    , Surname varchar(50) not null
    , DOB date
    , RegNo tinyint
    , Photo varchar(255)
    , Nickname varchar(50)
    , Comments varchar(255)
    , Position varchar(50)
    , GamesPlayed tinyint
    , GoalsScored tinyint
    , Active (this is the bit i am unsure of)

    but i now want to add a checkbox to my php form, which i can sort but i am unsure how to set up the database to accept the value from my php.

    basically what i am asking is what should i have after the active option above?

    Please help


  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    i would use either CHAR(1) with values 'Y' or 'N', or better yet TINYINT with values 1 or 0 | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Mar 2003
    thanks very much


Posting Permissions

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