开发者

zend_db_select with a hexadecimal query parameter against a binary column

How do you represent this query as a Zend_Db_Select?

select * from t where id = x'0cc175b9c0f1b6a831c399e269772661';

The database is MySQL, usi开发者_如何学Cng either PDO or mysqli adapters.


You have probably to use Zend_Db_Expr:

$adapter->select()->from('t')->where('id = ?', new Zend_Db_Expr("x'0cc175b9c0f1b6a831c399e269772661'"));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜