Rev 813 | Rev 863 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 813 | Rev 817 | ||
---|---|---|---|
Line 22... | Line 22... | ||
22 | class OIDplusDatabaseConnectionMySQLi extends OIDplusDatabaseConnection { |
22 | class OIDplusDatabaseConnectionMySQLi extends OIDplusDatabaseConnection { |
23 | private $conn = null; // only with MySQLnd |
23 | private $conn = null; // only with MySQLnd |
24 | private $prepare_cache = array(); |
24 | private $prepare_cache = array(); |
25 | private $last_error = null; // we need that because MySQL divides prepared statement errors and normal query errors, but we have only one "error()" method |
25 | private $last_error = null; // we need that because MySQL divides prepared statement errors and normal query errors, but we have only one "error()" method |
26 | 26 | ||
27 | public static function getPlugin(): OIDplusDatabasePlugin { |
- | |
28 | return new OIDplusDatabasePluginMySQLi(); |
- | |
29 | } |
- | |
30 | - | ||
31 | public function doQuery(string $sql, /*?array*/ $prepared_args=null): OIDplusQueryResult { |
27 | public function doQuery(string $sql, /*?array*/ $prepared_args=null): OIDplusQueryResult { |
32 | $this->last_error = null; |
28 | $this->last_error = null; |
33 | if (is_null($prepared_args)) { |
29 | if (is_null($prepared_args)) { |
34 | $res = $this->conn->query($sql, MYSQLI_STORE_RESULT); |
30 | $res = $this->conn->query($sql, MYSQLI_STORE_RESULT); |
35 | 31 |