Jump to content


Photo

Need help with making tables


  • Please log in to reply
1 reply to this topic

#1 johntp

johntp
  • Members
  • PipPipPip
  • Advanced Member
  • 95 posts

Posted 01 May 2006 - 06:37 PM

Hey guys i just got the extention for dreamweaver the Dynamic Dependant Menus and im trying to setup a table to store the stuff but i dont know how to set the table up........ do i use varchar ect.........

You have to set it up like this
Table: Types

id_type type
1 Book
2 CD

Table: Genre

id_genre genre
1 Sci Fi
2 Terror
3 Modern Novel
4 essay
5 Brit Pop
6 New Age
7 Madchester

Table: Authors

id_author auther
1 Issac Ossimov
2 another
3 another
4 ECT.....
5 ect.....
6 ect
7 ect

Table: tbl_items

id_item item id_author id_genre id_type
1 blah1 1 4 2
2 blah2 2 3 2
3 blah3 3 2 2
4 blah4 1 1 2
5 blah5 4 1 2
6 blah6 5 7 1
7 blah7 5 7 1
8 blah8 6 6 1
9 blah9 7 5 1

Im soooooo Lost. LOL post if you can help me.

Edit:Didnt post like i thought it would so just think of it as suppose to be tables with the #'s under the items
There are only 10 kind of people in the world, those who know binary, and those who don't.

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 02 May 2006 - 06:31 PM

Sure, you can use VARCHAR(255) for each text field, though you may want to split off first/last for the authors table. Otherwise, use UNSIGNED INTs for storing IDs.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users