I am encountering a strange error which I am not able to replicate with earlier version of Codeigniter (1.7)
The error I get is
A Database Error Occurred
Error Number: 1054
Unknown column 'Free' in 'field list'
INSERT INTO `devices` (`deviceIdentifier`, `installType`) VALUES (351863048175265, Free)
Line Number: 330
My Controller code is as follows
$data = array(
'deviceIdentifier' => $deviceID,
My model code is as follows
class device_model extends CI_Model
The two variables ‘$deviceID’ and ‘$appType’ have valid alphanumeric values.The columns ‘deviceIdentifier’ and ‘installType’ are varchar columns in table ‘devices’
Has anyone encountered this error? when I add quotes around the variables ‘$deviceID’ and ‘$appType’, it works, but the value in the table also has the quotes.Do we need to process text data before inserting in the MySQL table via active record?