SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Your daddy. WALoeIII's Avatar
    Join Date
    Apr 2001
    Location
    USA
    Posts
    526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Script to keep track of storage slots.

    I am trying to design a script to keep track of the slots on a trailer for boats. The trailer has 12 slots like this:

    ____________________
    |____|____|____|____|
    |____|____|____|____|
    |____|____|____|____|

    I want to keep track, and allow people to sign up for specific slots, and then I want to be able to clean it out, and start over, with a blank graph every week. What I don't understand is how I should setup my MySQL table. I don't even really know were to start, and also, how should I do the forms, have a button in all the empty one, saying CLICK HERE, that will take them to a separate form, where they can sign-up? or something different? And also, I want to show the names of each person, in the slot they have chosen. I have some other stuff that I want to do, but I think that I can do that, once I get this project off the ground. Thanks a ton!

  2. #2
    Your daddy. WALoeIII's Avatar
    Join Date
    Apr 2001
    Location
    USA
    Posts
    526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am pretty handy with PHP and MySQL, I just am mostly stumped on how to layout my table, and keep all my information normalized.

  3. #3
    Node mutilating coot timnz's Avatar
    Join Date
    Feb 2001
    Location
    New Zealand
    Posts
    516
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For something really simple,

    Give each space in the trailor, a trailor ID, ie tid,

    Then when someone inserts their name, it goes in the row where tid = 'whatever'.

    So:

    |tid|name|otherstuff|
    | 1 |john |I rule |

    And just put a link in the empty ones to a page where they can go and put their name in a space in the trailor. (A link in the actual page, not in the database)

  4. #4
    Your daddy. WALoeIII's Avatar
    Join Date
    Apr 2001
    Location
    USA
    Posts
    526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    yeah!

    I think I was trying to way over complicate this! So then would I just put an if statement, checking each slot to see if a row was returned? Or how can I do it using 1 query to the database? I don't want to have to query the db 12 times, and then do an if/else for each of the queries, but I guess I will if that is the only thing possible. Or maybe I could add another simple value, that was either 1 or 0 depending if the slot was occupied?


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
  •