You are here

public function PHPExcel_CachedObjectStorage_SQLite::deleteCacheData in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/SQLite.php \PHPExcel_CachedObjectStorage_SQLite::deleteCacheData()

Delete a cell in cache identified by coordinate address

Parameters

string $pCoord Coordinate address of the cell to delete:

Throws

PHPExcel_Exception

Overrides PHPExcel_CachedObjectStorage_CacheBase::deleteCacheData

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/SQLite.php, line 157

Class

PHPExcel_CachedObjectStorage_SQLite
PHPExcel_CachedObjectStorage_SQLite

Code

public function deleteCacheData($pCoord) {
  if ($pCoord === $this->_currentObjectID) {
    $this->_currentObject
      ->detach();
    $this->_currentObjectID = $this->_currentObject = null;
  }

  //	Check if the requested entry exists in the cache
  $query = "DELETE FROM kvp_" . $this->_TableName . " WHERE id='" . $pCoord . "'";
  if (!$this->_DBHandle
    ->queryExec($query)) {
    throw new PHPExcel_Exception(sqlite_error_string($this->_DBHandle
      ->lastError()));
  }
  $this->_currentCellIsDirty = false;
}