togi_one
06-27-2011, 05:00 PM
Hi, I want to increase all the prices in a table by 10%. This is what I use to increase the prices by a simple addition:
UPDATE table_name
SET `Price`= `Price`+10
I am assuming I need to combine an SQL statement with some PHP like this:
$percentage = 10;
$whatever = `Price` - (($percentage/100)*`Price`);
But I do not know how. Can anyone help?
UPDATE table_name
SET `Price`= `Price`+10
I am assuming I need to combine an SQL statement with some PHP like this:
$percentage = 10;
$whatever = `Price` - (($percentage/100)*`Price`);
But I do not know how. Can anyone help?