У меня возникли проблемы с вставкой строк представления в БД. Я не совсем уверен, что вызывает его, но вот мой код;Вставить ошибку PHP & MySQL
$taskupdate = $db_new->prepare("INSERT INTO clients_tasks_updates (tid, sid, update, date, hours) VALUES (:tid, :sid, :update, :date, :hours)");
$taskupdate->execute(array(
':tid' => '1',
':sid' => '2',
':update' => 'Here is an update',
':date' => '01-01-2013',
':hours' => '50'
));
Это код ошибки я получаю:
Array ([0] => 42000 [1] => 1064 [2] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update, date, hours) VALUES ('1', '2', 'Here is an update', '01-01-2013', '50')' at line 1)
Task ID: 2
Staff ID: Scott
Update: Layout built for upcoming wordpress site.
Date: 22-10-2012
Hours: 6