I've got two tables, "videos" and "articles". I want to list the most recently added ones on my frontpage, for example. I want to join the two tables together, and then display the most recent ones using ORDER BY creation_date DESC from the new combined list.
"videos":
video_id, youtube_id, video_title, video_intro, video_content, video_picture, author_id, creation_date, last_modified_date, frontpage, video_path
"articles":
article_id, article_title, article_intro, article_content, article_picture, author_id, creation_date, last_modified_date, frontpage, article_path
I need to join these two tables together so that for example, article_title and video_title become "title".
Is there any way to do this, or must article_title and video_title (for example) be named the same in the table?
Thanks
P.S.
I've tried the following, but i know its not even close to right
SELECT article_id, article_title as title, article_intro, article_content, article_picture, a.author_id, v.author_id, date_format(a.creation_date, '%M %D, %Y') AS formatted_creation_date, date_format(v.creation_date, '%M %D, %Y') AS formatted_creation_date, article_path, video_title as title, video_intro, video_content, video_picture, video_path, a.creation_date as create_date, v.creation_date as create_date
FROM articles as a, videos as v
ORDER BY creation_date DESC