Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

for_update still don't work in phalcon 2.0.4 #10621

Closed
scmforever opened this issue Jul 9, 2015 · 1 comment
Closed

for_update still don't work in phalcon 2.0.4 #10621

scmforever opened this issue Jul 9, 2015 · 1 comment

Comments

@scmforever
Copy link

hello all
I used php_phalcon.dll "Phalcon 2.0.4 - Windows x86 for PHP 5.3.9 (VC9) " in windows
if I use model:
$area = \model\area::findFirst(array(
'conditions' => 'id=1',
'for_update' => true
));

it cause a fatal error:
Uncaught exception 'PDOException' with message 'SQLSTATE[HY093]: Invalid parameter number: parameter was not defined' in E:\local_express\truck\04code\server_php\api\index.php:444 Stack trace: #0 [internal function]: PDOStatement->execute() #1 [internal function]: Phalcon\Db\Adapter\Pdo->executePrepared(Object(PDOStatement), Array, Array) #2 [internal function]: Phalcon\Db\Adapter\Pdo->query('SELECT area.`...', Array, Array) #3 [internal function]: Phalcon\Mvc\Model\Query->_executeSelect(Array, Array, Array) #4 [internal function]: Phalcon\Mvc\Model\Query->execute() #5 E:\local_express\truck\04code\server_php\api\index.php(444): Phalcon\Mvc\Model::findFirst(Array) #6 [internal function]: {closure}() #7 E:\local_express\truck\04code\server_php\api\index.php(450): Phalcon\Mvc\Micro->handle() #8 {main} thrown in E:\local_express\truck\04code\server_php\api\index.php on line 444

and the logger tell me:
[Thu, 09 Jul 15 09:53:19 +0800][INFO] SELECT area.id, area.name, area.parent_id FROM area WHERE area.id = 1 LIMIT :AP0FOR UPDATE

I think the forupdate bug is still not fixed.

sorry, my english is not well.

@andresgutierrez
Copy link
Contributor

This is already fixed in the 2.0.x branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants