|
-
Mar 8th, 2008, 09:48 AM
#1
[RESOLVED] Sorting from multiple tables
I am helping a friend with his PHP/MySQL site and he has 2 tables.
Each table has a DATETIME field. I need to get all records from these tables, and display them in order of date.
I can't just display the table 1 by order, then table 2 underneath it. They need to be sorted and displayed together as if they came from the same table.
I have looked into SQL joins but I'm not sure if that's what I should be using. I also tried getting the results from table 1 (ORDER BY date), putting it into an array. Then results from table 2 and doing the same thing.
Then I merged the 2 arrays and tried to sort it like that, but it's not working, and I'm sure there's gotta be a better way?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|