Results 1 to 4 of 4

Thread: Temp table?

  1. #1
    Join Date
    Jan 2009
    Posts
    124

    Unanswered: Temp table?

    I've never built temporary tables before but maybe this is the best way to achieve the following using PHP & MYSQL:

    Goal: Have a dynamic list to check boxes which will be inserted into one field in the DB coma separates!

    For example; I have check boxes for red(1), green(2), blue(3) and yellow(4). I want the client to select as many as they wish and insert the numbers into one field in the DB. So the field colors might have a value of 1,3,4.


    I need a tutorial for temporary tables.
    Any ideas

    Nick

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    or
    red(1), green(2), blue(4) and yellow(8)
    so 3 = red + green, 15 = red + green + blue + yellow and so on., however using this approach you will only be able to store the colour once, you couldnt' say have two yellows
    and use a bitfield datatype
    or do the bit manipulation in the PHP presentation layer
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Jan 2009
    Posts
    124
    Can you point me to an explanation and example?

    Thank

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by oldnickj View Post
    Can you point me to an explanation and example?
    something you should read ---> this
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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