[eluser]steelaz[/eluser]
I have this code in my model:
Code:
$data['job_id'] = $job_id;
$data['type'] = $type;
$data['text'] = $text;
$data['timestamp'] = time();
$this->db->insert('events', $data);
For some reason CI doesn't put quotes around 'text' field and it produces flowing query, which returns an error :
Code:
INSERT INTO `events` (`job_id`, `type`, `text`, `timestamp`) VALUES ('7', 'error', Requested IP address [208.43.3.25] is not available! , 1229007771)
How (where) does CI decide if field should have quotes around value ('timestamp' also doesn't have quotes, but it's an integer)?