I have a "master" mysql query,the results are then treated with a
couple of other queries. All this works but gives me only the first row
of the master query. I would like every resulting row of the master
query to be treated. what am i doing wrong?
here is the code (the interesting part of it):
$query = "SELECT nomperso FROM personnages";
$result = mysql_query($query) or die ("error");
while ($row = mysql_fetch_array($result))
{
extract($row);
$query = "SELECT sum(impots) FROM territoires WHERE
nomperso='$nomperso'";
$result = mysql_query($query) or die ("error2");
while ($row = mysql_fetch_array($result))
{
extract($row);
$impotsn=$row[0];
$query = "update personnages set impots='$impotsn' where nomperso =
'$nomperso'";
$result = mysql_query($query) or die ("pougf");
echo "$impotsn $nomperso";
}
}?>
any help, leads would be appreciated.
thanks!