我有以下INSERT
代码:
$reservationSuccess = $app->modelsManager->executeQuery(
"INSERT INTO MastersReservedTime (master_id, service_id, date, time, desc)
VALUES (:master_id:, :service_id:, :date:, :time:, :desc:)",
array(
'master_id' => $OrderCommit->master_id,
'service_id' => $oneService -> service_id,
'date' => $OrderCommit->date,
'time' => $startTime,
'desc' => $desc
)
);
此代码生成以下错误消息:
PHP 致命错误:未捕获的异常 'Phalcon\Mvc\Model\Exception' 并带有消息 '语法错误,意外令牌 DESC,靠近 ')\r\n 值(:master_id:,:service_id:,:date:,:time: , :desc:)', 解析时: INSERT INTO MastersReservedTime (master_id, service_id, date, time, desc)\r\n VALUES (:master_id:, :service_id:, :date:, :time:, :desc:) (209)' in /var/www/api/v1.0/index.php:1827\n堆栈跟踪:\n#0 [内部函数]:Phalcon\Mvc\Model\Query->parse()\n#1 【内部函数】:Phalcon\Mvc\Model\Query->execute()\n#2 /var/www/api/v1.0/index.php(1827):Phalcon\Mvc\Model\Manager->executeQuery( 'INSERT INTO Mas...', Array)\n#3 [内部函数]:{closure}()\n#4 /var/www/api/v1.0/index.php(1961): Phalcon\Mvc\Micro->handle()\n#5 {main}\n 抛出 /var /www/api/v1.0/index.php 第 1827 行
什么可能导致问题?提前致谢!