本文整理汇总了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');
}