Hoping somebody can help me
I am trying to run multiple sql strings within a while loop.
So instead of doing:
I would like to do this:
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
while ($row2 = mysql_fetch_array($result, MYSQL_ASSOC))
I am running other queries prior to this to get the information that I need to determine what rows to update.
$sqlstring= "UPDATE People
SET Name=".$row["Name"].",Interests=".$row["Interests"]." WHERE Group='".$row["Group"]."'";
The script overall works and the correct items are being updated, however only 1 row is being update which I would assume is the last one being pulled and that it is because $sqlstring is being overwritten each time, is this correct?
If so how can I ensure that every sql query gets a unique variable e.g $sqlstring4 , is it possible to do a increase number on something like this?
Many thanks in advance.