My while keeps looping and i dont know why: code
<?php
$result = mysql_query("SELECT * FROM tag WHERE point='$pagename'");
while($row = mysql_fetch_array($result))
{
$result = mysql_query("SELECT * FROM tag WHERE point='$pagename'");
//username
echo $row["user"] . " ||";
//alias check
$result = mysql_query("SELECT * FROM tag WHERE (user='$my_name' && point='$pagename')");
if (!$row["alias"])
{
echo "As \"" . $my_name . "\"||";
}
else
{
echo "As \"" . $row["alias"] . "\"||";
}
switch ($row["role"])
{
case 1:
echo "Author ||";
break;
case 2:
echo "Illustrator ||";
break;
case 3:
echo "Reader ||";
break;
default:
echo "All ";
}
}
?>