开发者

Zend MySQL return a value only if all other criteria is met

I am wondering how to create a Zend/MySQL to check for the existance of a BLOB. The code I am using is not working. Any advice would be appreciated.

$result = array();  
$select = $this->select();  
$select->setIntegrityCheck(false);  
$select->from($this->_name, '*')  
        开发者_开发技巧->where(LENGTH($this->_name.'.ad_image') <= 0);  
$result = $this->fetchAll($select)->toArray();  


Try ...

$select->from($this->_name, '*')  
        ->where("LENGTH({$this->_name}.ad_image) <= 0");
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜