niche Posted September 30, 2011 Share Posted September 30, 2011 Can this be done with just sql? If so how? <?phprequire_once "connect_to_mysql.php";$result = mysql_query("SELECT * FROM preplan") or die(mysql_error());while ($result2 = mysql_fetch_array($result)) { $curwipprice = $result2['curwipprice']; $cliorder = $result2['cliorder']; require_once "connect_to_mysql.php"; mysql_query("UPDATE plan SET curwipprice = '" . $curwipprice . "' WHERE cliorder = '" . $cliorder . "'") or die(mysql_error());}?> Link to comment Share on other sites More sharing options...
niche Posted September 30, 2011 Author Share Posted September 30, 2011 UPDATE preplan INNER JOIN plan ON plan.cliorder = preplan.cliorder SET plan.curwipprice = preplan.curwipprice Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.