ok that worked NICE - but now i put the code with all the variables in my update script and it doesnt work
Code: Select all
$sql = "UPDATE sam_bestellung,sam_date_val SET sam_bestellung.Groupp='$groupp',sam_bestellung.EqDes='$eqdes',sam_bestellung.Area='$area',sam_bestellung.Yard='$yard',sam_bestellung.Hull='$hull',sam_bestellung.Classification='$classification',sam_bestellung.Custrefnr='$custrefnr',sam_bestellung.Custrefname='$custrefname',sam_bestellung.ShipNewbuild='$shipnewbuild',sam_bestellung.ShipOwner='$shipowner',sam_bestellung.Designer='$designer',sam_bestellung.Shiptype='$shiptype',sam_bestellung.Shipclass='$shipclass',
sam_date_val.ContrDate='$contrdate',sam_date_val.Plannedmonth='$plannedmonth',sam_date_val.actdeldate='$actdeldate',sam_date_val.incdate='$incdate',sam_date_val.exrate='$exrate',sam_date_val.currency='$currency',sam_date_val.contramount='$contramount',sam_date_val.deldate1='$deldate1',sam_date_val.deldate2='$deldate2',sam_date_val.deldate3='$deldate3',sam_date_val.amendment1='$amendment1',sam_date_val.amendment2='$amendment2',sam_date_val.amendment3='$amendment3'
WHERE sam_bestellung.projnr='$projnr' AND sam_date_val.projnr='$projnr' AND sam_bestellung.customernr='$customernr' AND sam_date_val.customernr='$customernr'";
mysql_query ($sql) or die ( 'MySQL-Fehler: ' . mysql_error ());
if (mysql_errno() != 0){
echo mysql_error();
}
if (mysql_query($sql,$db)) {
echo "<center>WORXs<c/enter>";
}
else{
echo "Didnt work </br></br>";
}
I get the echo WORXs - but the tables dont get updated. I should tell me if the sql UPDATE statement is wrong.
What could it be. I mean it worked with the two smal tables. Also i tried it in phpmyadmin and put in data for all the $xyzvariables and it worked. I also tested the variables like $projnr, $area and they work.
Some of them are empty, but i think that shouldnt be the prob. I also left some blank when i tried it in phpmyadmin. anyone got an idea? thanks again to all you guys helping me.