Esempio n. 1
1
 /**
  * remove session(s) from database
  * @param $sessionids session ids ( or id )
  */
 public function removeSession($sessionids)
 {
     if ($this->handle != null) {
         if (is_array($sessionids)) {
             $tmpids = $sessionids;
         } else {
             $tmpids = array($sessionids);
         }
         $this->handle->begin();
         $stmt = $this->handle->prepare('DELETE FROM captiveportal WHERE sessionid = :sessionid');
         foreach ($tmpids as $session) {
             $this->handle->executePrepared($stmt, array('sessionid' => $session), array("sessionid" => \PDO::PARAM_STR));
             $stmt->execute();
         }
         $this->handle->commit();
     }
 }