用于在sql php中存储折扣的数据类型[关闭]

I need to create a table for product management in that table field include like price , image , discount so any one can help me that which datatype is used for all of them.

It isn't a simple question as it seems at first look. I suggest you to read first how floats is implemented in different databases and programming languages. It will help you understand why you never shoud use floats to sotre money.

This article Always use decimal for money may help you.

Well you just have to ask yourself what the data is.

If its words of fixed length its CHAR(n) ( such as a SKU number), VARCHAR(n) is variable length up to n, TEXT is for things longer such as a description.

If it's money, like a price, it's a float, double, or decimal in the database ( they are all essentially the same thing, depends on your DB ). If it's a whole number it's an integer. For an image, if it's the link ( the src ) then use a VarChar, but for image data itself its a BLOB.

Words "hello" = strings, varchar, char, text
Numbers "1" = integers 
floats   "1.01" = float, double, decimal etc.
binary data - such as images its called a BLOB or Binary Large Object
lists such as a status, "paid, due, late" you could use a ENUM type field.

Here is some reading meterial on types in MySql. https://dev.mysql.com/doc/refman/5.0/en/data-type-overview.html