I want to retrieve all of the values in a field on a table, modify the value and insert it into another field in the table.
I have got this far but am not sure what to do next
$sql="SELECT (field1) FROM $dbsql ORDER BY id";
$results =mysql_query($sql);
while ($myrow=mysql_fetch_array($results)){
$oldvalue=$myrow["field1"];
$newvalue= $oldvalue*2;
}
Any suggestions
Thanks
Ian It's not a lie if you believe it!
I have got this far but am not sure what to do next
$sql="SELECT (field1) FROM $dbsql ORDER BY id";
$results =mysql_query($sql);
while ($myrow=mysql_fetch_array($results)){
$oldvalue=$myrow["field1"];
$newvalue= $oldvalue*2;
}
Any suggestions
Thanks
Ian It's not a lie if you believe it!