![]() 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/MySQL/ |
<?php class Customweb_Database_Driver_MySQL_Statement extends Customweb_Database_Driver_AbstractStatement { /** * * @var result resource */ private $result; public function getInsertId() { $this->executeQuery(); return mysql_insert_id($this->getDriver()->getLink()); } public function getRowCount() { $this->executeQuery(); if ($this->result === false) { return 0; } else if($this->result === true) { return mysql_affected_rows($this->getDriver()->getLink()); } else { return mysql_num_rows($this->result); } } public function fetch() { $this->executeQuery(); $rs = mysql_fetch_array($this->result, MYSQL_ASSOC); if ($rs === null) { return false; } else { return $rs; } } final protected function executeQuery() { if (!$this->isQueryExecuted()) { $this->result = mysql_query($this->prepareQuery(), $this->getDriver()->getLink()); if ($this->result === false) { throw new Exception(mysql_error($this->getDriver()->getLink())); } $this->setQueryExecuted(); } } protected function getResult(){ return $this->result; } }