I have a field in mysql DB rating with data type float(2,1). One row contains a value 0.5, but when I use
SELECT round(rating) FROM table WHERE ... gives value 0 instead of 1.
But SELECT round(0.5) gives value 1 (for Postgresql too).
Also, PHP always gives value 1 for echo round(0.5);
I am really confused.
Change your data type from float(2,1) to decimal(2,1) it may works for you.