本文整理匯總了PHP中BookQuery::filterByTitle方法的典型用法代碼示例。如果您正苦於以下問題:PHP BookQuery::filterByTitle方法的具體用法?PHP BookQuery::filterByTitle怎麽用?PHP BookQuery::filterByTitle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類BookQuery
的用法示例。
在下文中一共展示了BookQuery::filterByTitle方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testSubQueryWithoutAliasRecursive
public function testSubQueryWithoutAliasRecursive()
{
$c1 = new BookQuery();
$c2 = new BookQuery();
$c2->addSelectQuery($c1);
// no alias
$c2->filterByPrice(20, Criteria::LESS_THAN);
$c3 = new BookQuery();
$c3->addSelectQuery($c2);
// no alias
$c3->filterByTitle('War%');
$sql = "SELECT alias_2.ID, alias_2.TITLE, alias_2.ISBN, alias_2.PRICE, alias_2.PUBLISHER_ID, alias_2.AUTHOR_ID FROM (SELECT alias_1.ID, alias_1.TITLE, alias_1.ISBN, alias_1.PRICE, alias_1.PUBLISHER_ID, alias_1.AUTHOR_ID FROM (SELECT book.ID, book.TITLE, book.ISBN, book.PRICE, book.PUBLISHER_ID, book.AUTHOR_ID FROM `book`) AS alias_1 WHERE alias_1.PRICE<:p2) AS alias_2 WHERE alias_2.TITLE LIKE :p1";
$params = array(array('table' => 'book', 'column' => 'TITLE', 'value' => 'War%'), array('table' => 'book', 'column' => 'PRICE', 'value' => 20));
$this->assertCriteriaTranslation($c3, $sql, $params, 'addSelectQuery() forges a unique alias if none is given');
}