php - Using a Zend_Db_Expr -


i have following query:

$select = $this->getdao()->select()                          ->from(                            array(new zend_db_expr('from_unixtime(expiration)'))                            ); 

the getdao function reference data access object class looks this:

class model_db_accountresetdao extends zend_db_table_abstract {     protected $_name = 'accountreset';     protected $_primary = 'reset_id'; } 

now following error:

"select query cannot join table"

this while don't want join. want select field unixtimestamp

how can solve problem?

all appreciated.

tnx

if gettin select object zend_db_table_abstract can't pass him ->from(). think should

$select = $this->getdao()->select()                            ->from(this->getdao(),                            array('_date or field='.new zend_db_expr('from_unixtime(expiration)'))                            ); 

or this.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -