我收到此错误:
A Database Error Occurred
Error Number: 0
UPDATE `announcement_detail` SET `announcement_title` = 'test', `announcement_desc` = 'test announcement\r\ntest announcement\r\ntest announcement\r\ntest announcement\r\ntest announcement\r\ntest announcement ', `announcement_date` = '2015-01-05' WHERE `announcement_id` = 101
Filename: C:\wamp\www\nid\system\database\DB_driver.php
Line Number: 330
答案 0 :(得分:0)
你是否正在逃避你的' \' ?见http://dev.mysql.com/doc/refman/4.1/en/string-literals.html
答案 1 :(得分:0)
尝试此活动记录:
$data = array(
"announcement_title" => "test1",
"announcement_desc" => "some description",
"announcement_date" => "2015-01-05"
);
$this->db->update("announcement_detail",$data);
$this->db->where("announcement_id",101);