I have the following script which loops through but only carries out the action once because the string $result has already been used when it gets to the 2nd update. How can I clear out values ??
while ($x < $value) {
$result=mysql_query("SELECT * FROM db");
$list = mysql_num_rows($result);
while ($i < $list) {
$row = mysql_fetch_array($result);
$p = $row["ID"];
mysql_query("INSERT INTO db () VALUES ($p);
$ic++;
}
$x++;
}
As you can see when it loops back to the first while and begins to run through it gets to the $result and stops because it has already been used.
How do I clear ??
Thanks.