FRIHOSTFORUMSSEARCHFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Friends RECENT activity.

 


PleoMaster
Code:

<?
$status_friend = mysql_query("SELECT * FROM `friends` WHERE `there_id`='$logged[id]'");
while($status_friends = mysql_fetch_array($status_friend)) {


$select_status = mysql_query("SELECT * FROM `moods` WHERE `uid`='$status_friends[my_id]' ORDER BY  `id` DESC LIMIT 10");
while($status_select = mysql_fetch_array($select_status)) {


echo("$status_select[uid] - $status_select[status]<br>");
}
}
?>


This is my bit of code what i am trying to do is to display the last 10 moods posted by the LOGGED users ID such as:

1 - Hola
2 - im next
1 - i am back again

But what my code is doing is arranging it by the friends ID instead of the status ID,

It is displaying

1 - Hola
1 - i am back again
2 - im next

If anyone can help with this would be really helpful.

Thanks Smile
Related topics

Kill one ant comes two ants
This Topic
Folder_hot.gif image - what's it mean?
PHP Redirection Varible Folders (That dont exsist)
Buddy list ?

Conservative Christian Dictionary.
meebo.com
e-ignite: Blog now updated - bigger and better than before
StatsCounter New: Recent Visitors on a Google Map
Friends should be friends forever

Einstein proves Religion
should we care about antartic ice melting?
If you want more users
show *recent* forum users
Happy Tree Friends
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.