Organize array in PHP from mysql

Posted by Matthew Carter on Stack Overflow See other posts from Stack Overflow or by Matthew Carter
Published on 2010-06-17T05:41:47Z Indexed on 2010/06/17 5:53 UTC
Read the original article Hit count: 233

Hi i have a social networking website.

what i want it to do is pull out my friends status updates.

basically what it does is i have a mysql query that pulls out all of my friends and in that while loop there is another mysql query that pulls out the status's from my friends.

i want it to be in order of date but since its one while loop in another what it does is pull out all status's from friend 1 then 2 then 3 and not in order by date. i even tried ORDER BY DATE but that just ordered it by date within the friend.. my thought is that i could putt it all in an array and friends is one thing and the values is the stats. then just sort by values would this work and how could i do it.

THANKS SO MUCH

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql