Merge Two Tables Data
Posted: Sat Apr 07, 2012 9:25 am
Hey,
I've Google'd about and tried many different examples of what I need and none seemed to work, soooo hopefully you'll be able to help me. Basically I have a table that "logs" user activity and also a table that is for "wall posts" and I basically want to show both of them together in one list.
Here's the table's structure...
log
id, userid, loginfo, timeadded
wallpost
id, userid, thepost, timeadded
Now I want to have it merge both together and ordered using the timeadded value. Now I've tried doing it with JOIN, LEFT JOIN and various other methods (including having two seperate queries and results that are added together as a seperate array - but that didn't work either).
Any ideas?
I've Google'd about and tried many different examples of what I need and none seemed to work, soooo hopefully you'll be able to help me. Basically I have a table that "logs" user activity and also a table that is for "wall posts" and I basically want to show both of them together in one list.
Here's the table's structure...
log
id, userid, loginfo, timeadded
wallpost
id, userid, thepost, timeadded
Now I want to have it merge both together and ordered using the timeadded value. Now I've tried doing it with JOIN, LEFT JOIN and various other methods (including having two seperate queries and results that are added together as a seperate array - but that didn't work either).
Any ideas?