Jump to content

Storing Prices in MySQL


ShoeLace1291

Recommended Posts

I'm making a restaurant menu system with PHP and I'm storing the dishes(or items or w/e) with a database table.  I need to be able to store the price of the dish.  Ex 3.99  What's the best column type to use for this?  It needs to be able to go up to 100.00.  I tried float and inserted a sample with the price of 3.65, but after i clicked submit to execute the query, it was automatically rounded up to 4 even.

Link to comment
https://forums.phpfreaks.com/topic/196726-storing-prices-in-mysql/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.