Use executeQuery as often as possible. re #49, #48

このコミットが含まれているのは:
Sébastien Lucas 2014-05-03 17:52:08 +02:00
コミット 23fcc4d641
2個のファイルの変更4行の追加4行の削除

ファイルの表示

@ -47,10 +47,10 @@ class Author extends Base {
} }
public static function getAllAuthorsByFirstLetter() { public static function getAllAuthorsByFirstLetter() {
$result = parent::getDb ()->query('select substr (upper (sort), 1, 1) as title, count(*) as count list (, $result) = parent::executeQuery ("select {0}
from authors from authors
group by substr (upper (sort), 1, 1) group by substr (upper (sort), 1, 1)
order by substr (upper (sort), 1, 1)'); order by substr (upper (sort), 1, 1)", "substr (upper (sort), 1, 1) as title, count(*) as count", "", array (), -1);
$entryArray = array(); $entryArray = array();
while ($post = $result->fetchObject ()) while ($post = $result->fetchObject ())
{ {

ファイルの表示

@ -539,10 +539,10 @@ where data.book = books.id and data.id = ?');
} }
public static function getAllBooks() { public static function getAllBooks() {
$result = parent::getDb ()->query("select substr (upper (sort), 1, 1) as title, count(*) as count list (, $result) = parent::executeQuery ("select {0}
from books from books
group by substr (upper (sort), 1, 1) group by substr (upper (sort), 1, 1)
order by substr (upper (sort), 1, 1)"); order by substr (upper (sort), 1, 1)", "substr (upper (sort), 1, 1) as title, count(*) as count", self::getFilterString (), array (), -1);
$entryArray = array(); $entryArray = array();
while ($post = $result->fetchObject ()) while ($post = $result->fetchObject ())
{ {