$q = "select * from DB_Product where Kind = $Kind ";
if(!($res = mysql_DB_query($DB, $q)))
die("query failed.");
$res = mysql_db_query($DB, $q);
while($row = mysql_fetch_object($res)) {
$Product_ID=$row->Product_ID;
$Kind=$row->Kind;
$Price_Ex=$row->Price_Ex;
$Price_Ex_1 = $Price_Ex *10/100;
$Price_Ex_2 = $Price_Ex + $Price_Ex_1;
}
$q = "update DB_Product set Price_Ex=$Price_Ex_2
where Kind = $Kind ";
if(!($res = mysql_DB_query($DB, $q)))
die("query failed.");
$res = mysql_db_query($DB, $q);
if(!$dbconn){
die("Connection failed.");
}else
{
if(($res = mysql_DB_query($DB, $q))){
confirm();
}else{
inputerror();
}
}
///////////////////////////////////////////////////////////////////////////
as your $Price_Ex_2 is double type remove qoutes from it
if your $kind is not string type then its ok that you gave but if it is string type make sure that it is qouted
thank you
I have 5 PHP programs that work as web sites allowing
adding rows, deleting row and updating single rows
window XP Prof SP3
(1) pilot's logbook access MySQL
(2) pilot's logbook access Oracle
(3) pilot's logbook access sql server 2008 express
Fedora 12
(1) pilot's logbook access MySQL
(2) pilot's logbook access Oracle
I can email
Voltaire: If God did not exist, it would be necessary for us to invent Him
GOD: If Voltaire did not exist, it would be necessary for us to invent him