views:

18

answers:

1

How do you represent this query as a Zend_Db_Select?

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

The database is MySQL, using either PDO or mysqli adapters.

A: 

You have probably to use Zend_Db_Expr:

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