read out data for SWITCH
Posted: Wed Nov 30, 2005 8:00 pm
this code is supposed to update a dataset.
my problem is, that the VAT value is allready in the dataset that i want to change (red).
i dont know how to get it out for the SWITCH or hot to write the command.!)!
my problem is, that the VAT value is allready in the dataset that i want to change (red).
i dont know how to get it out for the SWITCH or hot to write the command.!)!
Code: Select all
<?php
error_reporting(E_ALL);
if($_POST['exrate']>0){
switch ([color=red]VAT[/color]){
case J:
$sql = "UPDATE sam_date_val SET tovalue=toamount*'" .$_POST['exrate']."'*'1.16'+amendment1+amendment2+amendment3 WHERE (projnr='$projnr' AND customernr='$customernr' AND contrdate='$contrdate')";
mysql_query ($sql) or die ( 'MySQL-Fehler: ' . mysql_error ());
case N:
$sql = "UPDATE sam_date_val SET tovalue=toamount*'" .$_POST['exrate']."'+amendment1+amendment2+amendment3 WHERE (projnr='$projnr' AND customernr='$customernr' AND contrdate='$contrdate')";
mysql_query ($sql) or die ( 'MySQL-Fehler: ' . mysql_error ());
}
}
?>