public function delete($cache = null)
    {
        $index = $this->getIndex();
        $value = $this->getFieldValue($index);
        if ($value) {
            if($cache) {
                $this->db->removeCache($this->getCacheId($cache));
            }
            return $this->db->exec("DELETE FROM {$this->table_name} WHERE `$index` = ?", array($value), $this->getCacheId($value));
        }
        return false;
    }
public function delete($cache = null)
    {
        $index = $this->getIndex();
        $value = $this->getFieldValue($index);
        if ($value) {
            if($cache) {
                $this->db->removeCache($this->getCacheId($cache));
            }
            return $this->db->exec("DELETE FROM {$this->table_name} WHERE `$index` = ?", array($value), $this->getCacheId($value));
        }
        return false;
    }
public function delete ( $ cache = null ) { $ index = $ this -> getIndex ( ) ; $ value = $ this -> getFieldValue ( $ index ) ; if ( $ value ) { if ( $ cache ) { $ this -> db -> removeCache ( $ this -> getCacheId ( $ cache ) ) ; } return $ this -> db -> exec ( "DELETE FROM {$this->table_name} WHERE `$index` = ?" , array ( $ value ) , $ this -> getCacheId ( $ value ) ) ; } return false ; }
Eliminar el modelo de la base de datos

@param null $cache
@return bool
Eliminar el modelo de la base de datos