I have a weird problem and I can't figure it out. I have this select :
$select = mysql_query("SELECT user_id, torrent_id, torrentname FROM wishlist WHERE user_id = '".$USER['id']."'") or die (mysql_error());
while ($row = mysql_fetch_assoc($select)){
echo "<a href='details.php?id=".$row['torrent_id']."'>".$row['torrentname']."</a><br/>";
}
So far so good, but the problem is when I'm trying to add a second table in the select, like this:
$select = mysql_query("SELECT wishlist.user_id as uid, wishlist.torrent_id as wtid, wishlist.torrentname as wtn, categories.id FROM wishlist, categories WHERE wishlist.user_id = '".$USER['id']."'") or die (mysql_error());
while ($row = mysql_fetch_assoc($select)){
echo "<a href='details.php?id=".$row['wtid']."'>".$row['wtn']."</a><br/>";
}
Now the problem is that instead of 4 rows that it should show in the mysql_fetch_assoc, show those 4 rows again and again and so on... What I am doing wrong?
do{ beer++ }while(sober); ===//\==\//=== while($lifes_a_bitch == true) { live(); } die;