diff --git a/bureau/class/db_mysql.php b/bureau/class/db_mysql.php index 572e18fc..a91ea920 100644 --- a/bureau/class/db_mysql.php +++ b/bureau/class/db_mysql.php @@ -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(); }