everything works fine, but the output is being listed twice.
so it echos out: 'output a' 'output a' 'output b' 'output b' 'output c' 'output c' and so on.
when i do a mysql query in phpmyadmin, everything is only listed once. any ideas?
what my code is doing is going and getting a many-to-many field
<?
$something = mysql_query('select UserID from users where Username ="'. $username .'"');
while ($row = mysql_fetch_array($something)) {
$barf = $row['UserID'];
}
$result = mysql_query('SELECT name FROM items p LEFT JOIN list up ON p.item_id = up.item_id WHERE up.UserID = "' . $barf . '"');
while ($r = mysql_fetch_array($result)) {
foreach($r as $uue) {
echo $uue . '<br>';}
}
}
?>