soil Posted March 13, 2007 Share Posted March 13, 2007 im wanting to add a "Log" style page to the website im working on. idea im going for is having it so when people post wallpapers/comments it will list them in order of date. both of the tables have the a date field so would sort them by that but how to i group the data from both of the tables together? so i could display it like: comment1 added - 13/03/2007 comment2 added - 12/03/2007 wallpaper4 added - 11/03/2007 comment3 added - 10/03/2007 and not have it like: comment1 added - 13/03/2007 comment2 added - 12/03/2007 comment3 added - 10/03/2007 wallpaper4 added - 11/03/2007 its something iv never done before and i always try something new when doing websites :rolleyes: Link to comment Share on other sites More sharing options...
0 JoeC Posted March 13, 2007 Share Posted March 13, 2007 Why not grab the two results, do an array_merge and then sort the arrays by the date? Link to comment Share on other sites More sharing options...
Question
soil
im wanting to add a "Log" style page to the website im working on.
idea im going for is having it so when people post wallpapers/comments it will list them in order of date.
both of the tables have the a date field so would sort them by that but how to i group the data from both of the tables together?
so i could display it like:
comment1 added - 13/03/2007
comment2 added - 12/03/2007
wallpaper4 added - 11/03/2007
comment3 added - 10/03/2007
and not have it like:
comment1 added - 13/03/2007
comment2 added - 12/03/2007
comment3 added - 10/03/2007
wallpaper4 added - 11/03/2007
its something iv never done before and i always try something new when doing websites :rolleyes:
Link to comment
Share on other sites
1 answer to this question
Recommended Posts