![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/lib/internal/Customweb/Database/Driver/MySQLi/ |
<?php class Customweb_Database_Driver_MySQLi_Statement extends Customweb_Database_Driver_AbstractStatement { /** * * @var result resource */ private $result; public function getInsertId() { $this->executeQuery(); return mysqli_insert_id($this->getDriver()->getLink()); } public function getRowCount() { $this->executeQuery(); if ($this->result === false) { return 0; } else if($this->result === true) { return mysqli_affected_rows($this->getDriver()->getLink()); } else { return mysqli_num_rows($this->result); } } public function fetch() { $this->executeQuery(); $rs = mysqli_fetch_array($this->result, MYSQLI_ASSOC); if ($rs === null) { return false; } else { return $rs; } } final protected function executeQuery() { if (!$this->isQueryExecuted()) { $this->result = mysqli_query($this->getDriver()->getLink(), $this->prepareQuery()); if ($this->result === false) { throw new Exception(mysqli_error($this->getDriver()->getLink())); } $this->setQueryExecuted(); } } protected function getResult(){ return $this->result; } }