I want to add money records to a mysql database and I'm having a problem adding say 7.00 to the database without mysql automatically chopping it to 7. Or If it's 7.10 it chops it to 7.1. I currently have it set to float, but I've also tried decimal and double. What do I need to do on the mysql or php side to make it keep the trailing 0's when i'm adding money to the database?
Thanks in advance!
Should be ok i you set the field up as decimal(dollar length, cent length). So depending on how many dollars could possibly be input, say in the millions, you would set it as decimal(7,2)
That was it, just missed the length part, thanks a bunch!