

CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: ‘分类’ for column ‘buy_cat_id’ at row 1. The SQL statement executed was: INSERT INTO `erp_customer` (`realname`, `tel`, `address`, `spec_con`, `join_time`, `buy_cat_id`) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5)。
When importing from Excel, if a cell is empty, I set it to “”, but it still gets converted to 0, causing the insert to fail. The reason is that the UNSIGNED attribute is set in MySQL, which prevents the 0 value from being inserted! Removing the UNSIGNED setting from the field fixes this!

