The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Threaded View

Help with float field

I have a mySQL table with pitcher stats. The innings pitched field is a float, because a pitcher can pitch partial innings, such as 3 1/3, which is stored as 3.1. When I am adding a pitchers innings pitched, I need to be able to tell when it the number after the decimal gets to 3 or greater, to increment the number before the decimal, so if they pitched 10.3, that should be 11, or if they pitched 10.4, that should be 11.1. How can I do this?