parent
789fc5468e
commit
d9bdd2b136
10
serie.php
10
serie.php
|
@ -74,13 +74,13 @@ order by series.sort');
|
|||
}
|
||||
|
||||
public static function getAllSeriesByQuery($query) {
|
||||
$result = parent::getDb ()->prepare('select series.id as id, series.name as name, series.sort as sort, count(*) as count
|
||||
from series, books_series_link
|
||||
where series.id = series and series.name like ?
|
||||
$columns = "series.id as id, series.name as name, series.sort as sort, count(*) as count";
|
||||
$sql = 'select {0} from series, books_series_link
|
||||
where series.id = series and upper (series.name) like ?
|
||||
group by series.id, series.name, series.sort
|
||||
order by series.sort');
|
||||
order by series.sort';
|
||||
list ($totalNumber, $result) = parent::executeQuery ($sql, $columns, "", array ('%' . $query . '%'), -1);
|
||||
$entryArray = array();
|
||||
$result->execute (array ('%' . $query . '%'));
|
||||
while ($post = $result->fetchObject ())
|
||||
{
|
||||
$serie = new Serie ($post->id, $post->sort);
|
||||
|
|
Binary file not shown.
|
@ -714,6 +714,7 @@ class PageTest extends PHPUnit_Framework_TestCase
|
|||
array ("émile zola", 1, "1 author"),
|
||||
array ("Litterature", 1, "1 tag"),
|
||||
array ("Litterâture", 1, "1 tag"),
|
||||
array ("Serie des Rougon", 1, "1 series"),
|
||||
array ("Eugene Fasquelle", 1, "1 publisher")
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue