原则:绑定 IN 参数
我想知道是否可以将整数数组绑定为参数,这样我就可以做这样的事情?
$q = Doctrine_Query::create()
->update('blah c')
->set('ignored', true)
->where('id in ?', array(1,2,3,4));
我想这是不可能的,因为它实际上使用数据库/PDO 绑定变量,而数据库/PDO 不支持它。
如果我在文档或其他问题中错过了这一点,我深表歉意。谢谢。
I was wondering if it is possible to bind an array of integers as a parameter, so I could do something like this?
$q = Doctrine_Query::create()
->update('blah c')
->set('ignored', true)
->where('id in ?', array(1,2,3,4));
I guess that this isn't possible because it actually binds the variables using the database/PDO, which wouldn't support it.
Apologies if I have missed this in the documentation or another question. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用类似:
更多:
http://www .doctrine-project.org/documentation/manual/1_2/en/dql-doctrine-query-language
use like :
more :
http://www.doctrine-project.org/documentation/manual/1_2/en/dql-doctrine-query-language