Jump to content

Need Help with join


daedalus

Recommended Posts

Hey,

Ok I have two tables, one storing fanart information another storing reviews. Now each of these has similar fields (Author, Title, ID etc) but also some different fields, i.e. the fanart has a URL field, the review has a content field.

Both also have a column storing the date they were added to the database. Ok, what I want to get is the 5 most recent additions to the database. Now generating a list based on one type is easily done, with a basic select statement, and ordered by date.

However joining the two tables, so I can see the most recently added based on both tables, is proving more tricky, and wondered if anyone could help.

I considered maybe using a union statement, but I couldn't get that to work. So I'm guessing I need a join. Anyhelp would be appriciated.

Thanks
Link to comment
https://forums.phpfreaks.com/topic/5034-need-help-with-join/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.