Getting an error while trying to insert data into Mysql Table using datamapper ( Codeigniter )
Data truncated for column 'diameter' at row 1
INSERT INTO `purchases` (`bills_id`, `products_id`, `quantity`, `diameter`, `lena`, `lenb`, `lenr`, `thicka`, `thickb`, `widtha`, `widthb`, `boxes`, `resulta`, `resultb`) VALUES (1, 28, '2', '', '', '', '', '', '', '', '', '1', '', 2)
Here is the screenshot of the table

You're trying to insert an empty string
''intodouble. You cannot storestringin adoublecolumn. Make sure the date type isdoubleor compatible (int,float)Either insert a
0or
If there is no value, simply skip it in the query