[fix] Call to a member function rowCount() on boolean

This commit is contained in:
Benjamin Sonntag 2018-06-23 11:10:29 +02:00
parent 73376121e5
commit 2f00c01b48
1 changed files with 3 additions and 0 deletions

View File

@ -288,13 +288,16 @@ class DB_Sql {
* evaluate the result (size, width)
*/
function affected_rows() {
if (!$this->pdo_query) return 0;
return $this->pdo_query->rowCount();
}
function num_rows() {
if (!$this->pdo_query) return 0;
return $this->pdo_query->rowCount();
}
function num_fields() {
if (!$this->pdo_query) return 0;
return $this->pdo_query->columnCount();
}