Commit 0bcca19d by pupi1985 Committed by Scott

Add isEmpty method to DBResult

parent 75419dce
...@@ -112,6 +112,16 @@ class DbResult ...@@ -112,6 +112,16 @@ class DbResult
} }
/** /**
* Return true if the number of rows found (SELECT queries) or rows affected (UPDATE/INSERT/DELETE queries) is 0
* and false otherwise.
* @return int
*/
public function isEmpty()
{
return $this->stmt->rowCount() == 0;
}
/**
* Obtain the raw PDOStatement object. * Obtain the raw PDOStatement object.
* @return PDO * @return PDO
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment