Hi.
I have a database of product prices. My goal is to change the prices so they end in .49 or .99. I'd like all prices that end in .00 to .49 to be changed so they end in .49, and those that end in .50 to .99 changed so they end in .99
For example, product 1 has a price of 5.25. I need code that will change the value to 5.49. On another product, price is 5.78. I need that price changed to 5.99.
I know how to query SQL to get the original price and update the database with the new price.
I need php code to change the values so the prices end in .49 or .99.
Something along the lines of...
if ($price<=.49){$price = .49;}
else {$price = .99};
But of course I need only the decimals of my values to change... There must be a way to compare only those decimals... but I can't find it.
Thanks!
Rock