Hey guys, I was hoping someone could help me out here again.

I've seen people pulling entries from multiple MySQL tables by using the JOIN clause, but I can't seem to get it to work with what I am trying to do.

I have 3 tables which I wish to display ALL the info from on one PHP page.
I have 3 separate PHP files which each display their corresponding MySQL tables, but I want to have ONE page which displays all of them at once by order of "date" (kind of like a "latest updates" page of some sort).

What is the easiest way I can go about doing this?

My tables are "sports", "news", and "recipes", and they all have the fields "id", "title", "date", "content".

Edited by vivi288: -

8 Years
Discussion Span
Last Post by vivi288

More than likely you want the UNION operator to gather all the data together. I think you can order by date and get that effect "after" the union. Be sure to test.


Thank you so much!
I didn't even know the clause existed; I had only seen people do it by joins up until now.

It worked like a charm. Thank you again!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.