true来查询就报错Syntax error, unexpected token IDENTIFIER(FOR), near to ' UPDATE' {代码...} phalcon版本1.3.4 求证,你们的phalcon使用行锁for_upade会报..."/> true来查询就报错Syntax error, unexpected token IDENTIFIER(FOR), near to ' UPDATE' {代码...} phalcon版本1.3.4 求证,你们的phalcon使用行锁for_upade会报...">
开启事务后,按照文档说的参数"for_update" => true
来查询就报错Syntax error, unexpected token IDENTIFIER(FOR), near to ' UPDATE'
<code>$this->db->begin(); $robots = Robots::find(array( "conditions" => "name LIKE %steve%", "order" => "name", "for_update" => true )); ... $this->db->commit(); </code>
phalcon版本1.3.4
求证,你们的phalcon使用行锁for_upade会报错吗?还是我的代码不对?
http://www.myleftstudio.com/reference/models.html#finding-records
开启事务后,按照文档说的参数"for_update" => true
来查询就报错Syntax error, unexpected token IDENTIFIER(FOR), near to ' UPDATE'
<code>$this->db->begin(); $robots = Robots::find(array( "conditions" => "name LIKE %steve%", "order" => "name", "for_update" => true )); ... $this->db->commit(); </code>
phalcon版本1.3.4
求证,你们的phalcon使用行锁for_upade会报错吗?还是我的代码不对?
http://www.myleftstudio.com/reference/models.html#finding-records
是的,phalcon 1.3.X都有这个问题,应该是在今年6月份的时候phalcon 2.0.4解决了这个bug
解决办法,用最新的phalcon,或者使用pdo执行纯sql