[eluser]dallen33[/eluser]
Here's my error:
Quote:A Database Error Occurred
Error Number: 1406
Data too long for column 'notes' at row 1
INSERT INTO online_ads (client,rep,submitted,required,runs,type,size,pickup,url,notes,contacts,status,attachment) VALUES ('474','3','1253209296','1253772000000',NULL,'2','1 ',NULL,NULL,'\Opera \n2009|2010 Season\nHe can’t protect her.',' ',1,NULL)
So I know it's the apostrophe because when I remove it, it works.
I am XSS_CLEANing my posts like this:
Code:
$notes = $this->input->post('notes', TRUE);
I have global XSS turned on:
Code:
$config['global_xss_filtering'] = TRUE;
I've tried many ways of inserting:
Code:
$sql = "INSERT INTO online_ads (client,rep,submitted,required,runs,type,size,pickup,url,notes,contacts,status,attachment) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)";
$this->db->query($sql, array($client,$rep,$submitted,$required,$runs,$type,$size,$pickup,$url,$notes,$contacts,$status,$attachment));
Also this:
Code:
$escaped = $this->db->escape($ad_db_data);
$this->db->insert('online_ads', $escaped);
Also this:
Code:
$this->db->insert('online_ads', $ad_db_data);
So why is this causing me so much grief? I know I'm likely missing something obvious, but any help would be appreciated.