query multiple tables and display all entries in order

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
me666
Forum Commoner
Posts: 87
Joined: Wed Oct 08, 2008 5:04 pm

query multiple tables and display all entries in order

Post by me666 »

hi, i have been working on a little project, but want to make it easier to view results online. i need to be able to query several tables and display the results from all tables queried in order of date and time. i can do this all fine but only querying 1 table at a time and displaying on 1tables results. does anyone know how i might do this?
thanks
aravona
Forum Contributor
Posts: 347
Joined: Sat Jun 13, 2009 3:59 pm
Location: England

Re: query multiple tables and display all entries in order

Post by aravona »

You could try a join, or a union. This site explains a few ways :

http://articles.techrepublic.com.com/51 ... 50307.html
me666
Forum Commoner
Posts: 87
Joined: Wed Oct 08, 2008 5:04 pm

Re: query multiple tables and display all entries in order

Post by me666 »

sorry forgot to reply, thanks 4 that have used union select, works great :)
Post Reply