<?
include("head.php");
$query = "SELECT 'user' . 'username', 'user' . 'avatar' WHERE 'star' . 'username' = '".$id."' AND 'user' . 'username' = 'star' . 'friended' ORDER BY 'star' . 'fid'";
$result = mysql_query($query);
echo '<table><tr>';
while(list($username, $avatar) = mysql_fetch_row($result)){
echo '<td class="user"><a href="profile.php?username='.$username.'">
<img src="'.$avatar.'"><br />
'.$username.'</a></td>
';
}
echo '</tr></table>';
?>
ok. this is what its supposed to do. Take the username in the friends list (table called star) and get its avatar where the friends list is equal to the id of the current user on the site. what is wrong in this code?