General SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesGeneral SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old February 1st, 2004, 12:09 AM
jdkarns jdkarns is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Dayton, OH
Posts: 12 jdkarns User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Table Design Question?

I have seen more than one tutorial on making a Yahoo type link directory and basic search engine but I cant find anything like the website I'm trying to build.

I just want to display Categories (for site navigation) on every page, then Sub Categories, then listings, and finally Detailed listings. An example site is found here Http://www.daytondepot.com

Check out the progression of links by visiting

Accommodations then Hotels, then the hotel list and the go to Best Western where you will see a Detailed listing called More info. This is what I am trying to accomplish. I made a table layout in MySQL with a lookup table and reference keys in some of the tables. I can make a basic round trip through the categories but sometimes the wrong listings show up under the wrong sub-categories.

I am not sure if it is my Table layout or my queries and PHP progamming? If anyone has a nice database structure for something like this I would be soooo greatful! Most likely looking at the database setup and php programing I have done will be more trouble than just suggesting a good layout but I'm certainly willing to get more information to anyone who wants it.

Thanks

Sean Karns

Reply With Quote
  #2  
Old February 1st, 2004, 03:57 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 11 sec
Reputation Power: 8
Send a message via ICQ to stumpy Send a message via MSN to stumpy
I would use one table to handle the categories, and use a parent/child type setup. e.g.
Cats Table
catid INT PK
desc VARCHAR
parentid INT

In the table above, parentid references catid.
Then, I'd have a Hotels table (or whatver it is that are the listings)... that table should be simple. The foreign key would be catid.
__________________
DevArticles Moderator
BlueSix - Web Development and Consulting

Reply With Quote
  #3  
Old February 2nd, 2004, 10:08 AM
jdkarns jdkarns is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Dayton, OH
Posts: 12 jdkarns User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks!

stumpy,

Thanks for the table layout suggestion. I will see what I can do with it. I think I see where you are going, though I am a newbie at this Thanks alot for the reply to my question.

Sean Karns

PS If I can figure out how to set it all up and it works I will post about it. Thanks

Reply With Quote
  #4  
Old February 2nd, 2004, 03:33 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 11 sec
Reputation Power: 8
Send a message via ICQ to stumpy Send a message via MSN to stumpy
I build most large site using the tree structure setup. All the nav is contained in the one table, as outlined above. Examples:
http://www.ingrealestate.com.au/investment/
http://www.ingrealestate.com.au/development/
http://www.gbcaus.org/
http://www.gbcaus.org/greenstar/

Reply With Quote
  #5  
Old February 2nd, 2004, 05:07 PM
jdkarns jdkarns is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Dayton, OH
Posts: 12 jdkarns User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Example Sites

stumpy,

Thanks for the example sites. Those are some very nice websites indeed. I see the structure, it makes sense and I like it very much.

Thanks for the help

Sean Karns

Reply With Quote
  #6  
Old February 2nd, 2004, 07:12 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 11 sec
Reputation Power: 8
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Excellent - no problem

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesGeneral SQL Development > Table Design Question?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway