public function RowArray($optional_row_number = null, $resultType = MYSQLI_BOTH)
{
$this->ResetError();
if (!$this->last_result) {
$this->SetError("No query results exist", -1);
return false;
} elseif ($optional_row_number === null) {
if ($this->active_row > $this->RowCount()) {
$this->SetError("Cannot read past the end of the records", -1);
return false;
} else {
$this->active_row++;
}
} else {
if ($optional_row_number >= $this->RowCount()) {
$this->SetError("Row number is greater than the total number of rows", -1);
return false;
} else {
$this->active_row = $optional_row_number;
$this->Seek($optional_row_number);
}
}
$row = mysqli_fetch_array($this->last_result, $resultType);
if (!$row) {
$this->SetError();
return false;
} else {
return $row;
}
}