$navtype = $_GET['nav'];
if($navtype == "zjxpmovdtzjd")
{
$mileage_out = $_POST['mileage_out'];
$mileage_in = $_POST['mileage_in'];
$famount = $_POST['famount'];
$vreg = $_POST['vreg'];
$driver = $_POST['driver'];
$vtype = $_POST['vtype'];
$desti = $_POST['desti'];
$date_out = $_POST['dy']."-".$_POST['dm']."-".$_POST['dd'];
$date_in = $_POST['ay']."-".$_POST['am']."-".$_POST['ad'];
$cur_date = date("d-m-y H:i:s");
$outl = $_POST['outl'];
$out2 = $_POST['out2'];
$pload = $_POST['pload'];
$con_size = $_POST['con_size'];
$sup_name = $_POST['sup_name'];
$s_veration = $_POST['s_veration'];
$remnder_ver = $_POST['remnder_ver'];
$tf_con = ($_POST['mileage_in'] - $_POST['mileage_out']);
$tf_con = ($famount * 100) / $tf_con;
$tt_con = $_POST['tt_con'];
$sql = "UPDATE movlog
SET
(mileage_out='$mileage_out',mileage_in='$mileage_in',famount='$famount',vreg='$vreg',driver='$driver',vtype='$vtype',desti='$desti',date_out='$date_out',date_in='$date_in',cur_date='$cur_date',outl='$outl',out2='$out2',
pload='$pload',con_size='$con_size',sup_name='$sup_name',s_veration='$s_veration',remnder_ver='$remnder_ver',
tf_con='$tf_con',tt_con='$tt_con' WHERE id='$id')";
mysql_query($sql);
$sqlx = "UPDATE sre_log SET current_mileage = '$mileage_in' WHERE vreg='$vreg'";
mysql_query($sqlx);
echo "<center><p><br><br><br><strong>The movement log for $vreg has been UPDATE.</strong></p>";
}
Update is doing insert and not update
Page 1 of 12 Replies - 188 Views - Last Post: 05 February 2012 - 01:30 AM
Topic Sponsor:
#1
Update is doing insert and not update
Posted 04 February 2012 - 06:58 AM
Why would an update script do an insert, and not update?
Replies To: Update is doing insert and not update
#2
Re: Update is doing insert and not update
Posted 04 February 2012 - 07:28 AM
how do you know it’s been doing an insert?
#3
Re: Update is doing insert and not update
Posted 05 February 2012 - 01:30 AM
becouse it inserts and do update the records
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote



|