简体   繁体   中英

Zend Framework normal query to Zend_Db_Table

Here is my query:

"SELECT * FROM `posts` WHERE MATCH(title, text) AGAINST('".$word."' IN BOOLEAN MODE)";

How can I do this with Zend_Db_Table, I mean($this->select()...)

Best Regards!

$dbTable = new Default_Model_DbTable_Posts();
$select = $dbTable->select()->where('MATCH(title, text) AGAINST(? IN BOOLEAN MODE', $word);

Close the against:

$dbTable = new Default_Model_DbTable_Posts();
$select = $dbTable->select()->where('MATCH(title, text) AGAINST(? IN BOOLEAN MODE)', $word);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM