开发者

Zend Framework normal query to Zend_Db_Table

开发者 https://www.devze.com 2022-12-08 07:19 出处:网络
Here is my query: \"SELECT * FROM `posts` WHERE MATCH(title, text) AGAINST(\'\".$word.\"\' IN BOOLEAN开发者_运维百科 MODE)\";

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);
0

精彩评论

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