I have a php script that keeps outputting the same row more than 100 times! I really dont know how this is happening so hopefully you guys will know and tell me
PHP Code:
while($post = mysql_fetch_array(mysql_query("select * from table_posts where topic='$id'")))
{
echo($post['body']);
echo($post['userid']);
echo($post['date']);
echo("<br/>");
}
__________________
My webmaster news & tips blogs with free scripts and tutorials - http://ap-gfx.com
I would output $id and see if it's actually what it's supposed to be. And you might wanna try mysql_fetch_assoc() instead of _array, because I was having a problem like this using _array(), and switching to _assoc() fixed it.