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!

querying multiple tables

Status
Not open for further replies.

kjspear

Programmer
Feb 13, 2002
173
US
Hello, I have a question about selecting multiple tables. I have five tables that I'm querying.
Basically, this would allow the user to view only his/her postings from all five tables. These tables
are catagories. The tables are queried by that users' ID.


i.e Select imagefile,message from table1,table2,table3,table4,table5 where table1.userID=table2.userID etc.)

O.K., what has happened is that the query takes a very long time. Is there another way this can be done so that the query runs faster?

This is done in PHP.

Thanks
KJ
 
why is it absolutely necessary to use 5 tables ?? why not add a field 'catagory' where you put in 1,2,3,4 or 5 if you want to make a distinction which is now done with tables ??

 
Now that I think of it. I'll do just that.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top