Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

looking for simple code!!

Status
Not open for further replies.

hisham

IS-IT--Management
Nov 6, 2000
194
Can anyone guide me where to find a simple script where I can create directory contains categories and subcategories with the ability to browse and search the data stored in the mysql database.
 
What are you trying to say? You want a database structure with parent/child relationships?

You want a php variable with parent/child relationships? --BB
 
Hi BB,
Am looking for a code or tutorial that allows me to create an online directory, It's a kind of a yellow pages catalogue.
Thanks for your answer.
 
Database driven, you will need to learn the basics of relational databases.

Here's a brief run-down.

Having 2 or more tables link in some way. Lets say you have 2 tables, people and houses; in the people table you store all the necessary details about people (name, age, telephone, etc); in the houses table you store information about a house (detached, bedrooms, value, etc).

If you wanted to make one row (one person) from the people table link in some way to one row (one house) in the houses table you would use a relationship. Because each row in the table has a unique identifier (something that cannot change and is unique throughout that table), you have something reliable to reference to the row by. So if you add a new row to the peoples table called house_id or something similar, you can insert into identification from the houses table for the house that that person lives in.

This will give us a one to many relationship, because

1 house can have many people

Normalisation is the process of making sure no data is duplicated at any time, making your database more reliable and smaller (and therefore faster, or so they say). --BB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top