PDA

View Full Version : Excel Columns with Decimal Point Data


BrianD
01-03-2009, 11:22 AM
Hi
I've used VARCAR when creating a table with a Price Field.
Some of the prices within my excel spreadsheet have numbers like 24.95.
When I convert the spreadsheet into the database the price column is always empty (NULL)
Anyone else had this problem. (I purchase the Excel to Mysql software for doing this)
Many thanks
Brian

clifford
01-03-2009, 11:44 AM
The field in the mysql database should be decimal.

example:
`price` decimal(4,2) NOT NULL default '0.00'

BrianD
01-03-2009, 05:18 PM
Tried the DECIMAL (4,2) but that doesn't seem to work either, however the last import i did it changed the variable in phpadmin of the price field to DOUBLE... that for some reason now seems to work