php - Incorrect DECIMAL value when inserting MySQL 1 -


name type

price decimal(7,0)

insert products (uid, item_code,item_name, brand_name,model_number,weight,dimension,description,category,quantity,price,imagename)  values (1, '01','lenovo','lenovo laptop','qwqeiu145','50kg','5x9','lenovo best','computers & accessories','2','$250.0000','lenovo'); 

this error

1366 - incorrect decimal value: '$250.0000' column 'price' @ row 1

you need change

$250.0000 

to

250.0000 

because it's decimal datatype. , $ string


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -