public function unlock()
{
// Build the query
$this->_query = "UNLOCK TABLES";
// Exceute the query unprepared because UNLOCK and LOCK only works with unprepared statements.
$result = $this->queryUnprepared($this->_query);
$errno = $this->mysqli()->errno;
// Reset the query
$this->reset();
// Are there rows modified?
if ($result) {
// return self
return $this;
} else {
throw new Exception("Unlocking of tables failed", $errno);
}
// Return self
return $this;
}