Пример #1
0
 public function destroy($id)
 {
     if (isset($this->sessions[$id])) {
         unset($this->sessions[$id]);
     }
     Pfw_Cache_Dist::delete($this->cacheKey($id));
     $this->db->deleteFromTable($this->db_table, array('session_id = %s', $id));
 }
Пример #2
0
 protected function _toStringWhere()
 {
     $where_conds = array();
     if (!empty($this->where)) {
         foreach ($this->where as $alias => $where) {
             if (is_array($where)) {
                 $where = $this->adapter->_sprintfEsc($where);
             }
             array_push($where_conds, "({$where})");
         }
         return "WHERE " . implode($where_conds, " AND ");
     }
     return "";
 }
Пример #3
0
 /**
  * Deletes a set of records in the table that backs this model
  * 
  * @param array $where sprintf style array 
  * @return integer the number of rows affected
  */
 public function deleteAll($where)
 {
     $table = $this->description['table'];
     return $this->adapter->deleteFromTable($table, $where);
 }