public function PHPExcel_CachedObjectStorage_SQLite3::moveCell in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/SQLite3.php \PHPExcel_CachedObjectStorage_SQLite3::moveCell()
* Move a cell object from one address to another * *
Parameters
string $fromAddress Current address of the cell to move: * @param string $toAddress Destination address of the cell to move * @return boolean
Overrides PHPExcel_CachedObjectStorage_CacheBase::moveCell
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ CachedObjectStorage/ SQLite3.php, line 211
Class
- PHPExcel_CachedObjectStorage_SQLite3
- PHPExcel_CachedObjectStorage_SQLite3
Code
public function moveCell($fromAddress, $toAddress) {
if ($fromAddress === $this->_currentObjectID) {
$this->_currentObjectID = $toAddress;
}
$this->_deleteQuery
->bindValue('id', $toAddress, SQLITE3_TEXT);
$result = $this->_deleteQuery
->execute();
if ($result === false) {
throw new PHPExcel_Exception($this->_DBHandle
->lastErrorMsg());
}
$this->_updateQuery
->bindValue('toid', $toAddress, SQLITE3_TEXT);
$this->_updateQuery
->bindValue('fromid', $fromAddress, SQLITE3_TEXT);
$result = $this->_updateQuery
->execute();
if ($result === false) {
throw new PHPExcel_Exception($this->_DBHandle
->lastErrorMsg());
}
return TRUE;
}