Add the number of book in each databases (multidatabase).
This commit is contained in:
parent
c937a29d6c
commit
c6e75b7258
2 changed files with 10 additions and 2 deletions
6
book.php
6
book.php
|
@ -382,6 +382,12 @@ class Book extends Base {
|
|||
$this->getComment (), "text/html",
|
||||
$this->getLinkArray (), $this);
|
||||
}
|
||||
|
||||
public static function getBookCount($database = NULL) {
|
||||
global $config;
|
||||
$nBooks = parent::getDb ($database)->query('select count(*) from books')->fetchColumn();
|
||||
return $nBooks;
|
||||
}
|
||||
|
||||
public static function getCount() {
|
||||
global $config;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue