开发者

zend_db_select with a hexadecimal query parameter against a binary column

开发者 https://www.devze.com 2023-01-02 17:55 出处:网络
How do you represent this query as a Zend_Db_Select? select * from t where id = x\'0cc175b9c0f1b6a831c399e269772661\';

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

精彩评论

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