SQL extreme newbie question
SQL extreme newbie question
(OP)
I know this is very basic but I am new to database programming and under pressure to create a database for a client within the next month and make it efficient. I understand how to create the database and how to access it dynamically (I will be using PHP). I just want to make sure the initial setup is the best way to do it. What I have is a headline and news database for a college sports department. I want to be able to query the database for the information that will be used in for each sport and also a combined query to show headlines of the top stories on the main page. Would it be better to create one big table with a field for the name of the sport or seperate tables for each sport. If I create seperate tables how do use the join function to query more than two of the tables to find the latest 5 headlines for all of the sports to be displayed on the mainpage. Sorry for the length of this post, it's the simplest explaination I could come up with.
Thanks
Perry Lowe
Thanks
Perry Lowe
RE: SQL extreme newbie question
= 'basketball' will not pick up 'ladies basketball' unless you tell it to. You can also use the sub table to create a menu for your PHP forms.
To query across tables is not much different to 2 tables just add 'left join XXX on XXX' add nauseum. Be careful what you ask for with left joins.