SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast gnome's Avatar
    Join Date
    Jun 2002
    Location
    in a book
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    question about structure

    Hello all,
    I was looking through the forums and did not see anything that will get me started, so here I am.

    Scenario:
    3 clients
    3 jobs each client
    100 html files containing image mapping (map name, href, shape, & coords)

    Goal:
    What I would like to do is have php parse the data from the image mapped pages into a database.

    Software:
    php, mysql

    I have a database structure like so:

    table 1
    Client_____________
    JID --Auto increment
    name -- client name

    table 2
    Job_____________
    JOB_ID -- auto increment
    JID -- identify client
    name -- name of job

    table 3
    Image_Map________
    MID -- Auto increment
    JID -- to identify client
    JOB_ID -- identify job name
    map_name -- pulled from each map.html | there can be more than
    shape -- pulled from each map.html |-- one entry for each html
    coords -- pulled from each map.html | and some may have none


    Am I on the correct path? This is the first big project I have had to do and I know that more than anything your database needs to be setup properly from the beginning.

    If any further information is needed, please let me know.

    Thank you
    "Well, you know boys, a nuclear reactor is a lot like a woman.
    You just have to read the manual and press the right button."
    --Homer J Simpson

  2. #2
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's what I think.
    Code:
    Client
    ------
    JID
    name
    
    Job
    ---
    JOB_ID
    JID
    name
    
    Image_Map
    ---------
    MID
    JOB_ID
    map_name
    shape
    coords
    Exactly like what you did, except I removed the JID attribute from the Image_Map table because it seemed redundant. Can't really say more - I don't understand how the map_name, shape and coords attributes work.

  3. #3
    SitePoint Enthusiast gnome's Avatar
    Join Date
    Jun 2002
    Location
    in a book
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey
    Thank you redemption

    I appreciate your help.
    I have started the db design and we will go from there. If I have anymore questions, I know where to go.
    Have a good one.
    "Well, you know boys, a nuclear reactor is a lot like a woman.
    You just have to read the manual and press the right button."
    --Homer J Simpson


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
  •