Jump to content

Transcations Between Tables - Solved


niche

Recommended Posts

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

UPDATE preplan INNER JOIN plan ON plan.cliorder = preplan.cliorder SET plan.curwipprice = preplan.curwipprice

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...