How come I can only use a query result once in a while loop? When I execute the following code, only the first loop will display, and the second will simple show nothing.
$result=mysql_query("SELECT * FROM table");
while($row=mysql_fetch_assoc($result)){
echo $row['field1'];
echo $row['field2'];
}
while($row=mysql_fetch_assoc($result)){
echo $row['field1'];
echo $row['field2'];
}