Hi I am doing a Tizag tutorial.I have created this table products with phpMyAdm in and started to populate the field.When it comes to price if I insert 13.99 the amount is rounded up to 14.I have tried everything changing to decimal, float, double but nothing seems to work,it keeps rounding up the amount.Can somebody figure out what is the problem? This is important as I'll have to insert decimal values a lot.Thank you.

Can you post the code? We can then see any maybe problems.

Tizag mysql tutorial-groupby
Table Products-DB test
All the price column amounts get rounded up to the next dollat example id 123451 Park's Great Hits Music Price 19.99 my select query shows 20.00 and same for all other columns 3.99 to 4.00 and so on.
The table structure is id int(10)name varchar(20)type varchar(30)price-I've tried everyone decimal,float,double the result is still the same the amount is rounded up.Cannot figure it out.Thanks

try-
price type DECIMAL length 4,2
the ',2' being the number of decimal places.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.