Example #1
0
 protected function getUserPermissions($userID)
 {
     $sqlQuery = "SELECT permission FROM Users WHERE id = :id LIMIT 1";
     $sqlParam = array("id" => $userID);
     $this->database->prepare($sqlQuery);
     $this->database->execute($sqlParam);
     $response = $this->database->fetch();
     return isset($response['permission']) ? $response['permission'] : FALSE;
 }
Example #2
0
 /**
  * Return the number of rows affected by the last SQL
  * statement performed.
  *
  * @return  int
  */
 protected final function rowCount()
 {
     if ($this->database === NULL) {
         return $this->errorMessage("No database connection found.");
     }
     return $this->database->rowCount();
 }