I currently have a problem within PHP where I want to sort these posts by their creation date so that they can then be shown in descending order. I have been looking for a PHP function to do this but have had no luck.
Is there an easy solution to this? Any idea will be greatly appreciated :)
array
0 =>
array
'post_id' => string '1' (length=1)
'user_id' => string '3' (length=1)
'post' => string 'this is a post' (length=14)
'created' => string '2012-04-05 20:11:38' (length=19)
1 =>
array
'post_id' => string '2' (length=1)
'user_id' => string '2' (length=1)
'post' => string 'this is a post' (length=14)
'created' => string '2012-04-05 20:11:38' (length=19)
2 =>
array
'post_id' => string '3' (length=1)
'user_id' => string '5' (length=1)
'post' => string 'this is a post' (length=14)
'created' => string '2012-04-05 20:11:38' (length=19)
ORDER BY created DESC
– Michael Berkowski Apr 5 '12 at 19:27WHERE user_id IN (2,3,5)
is valid in MySQL – Arjan Apr 5 '12 at 19:43