UPDATE
Solved my problem according to PHP manual http://php.net/manual/en/mysqli.multi-query.php
And, we changed the following files:
- system / database / driver / DB_result.PHP
Add the multi_results function to the end of the file.
public function multi_results() { return array(); }
- system / database / driver / DB_driver.php
Add the multi_query () function after the simple_query () function.
function multi_query($sql, $binds = FALSE) { if ( ! $this->conn_id) { $this->initialize(); } $sql = $this->compile_binds($sql, $binds); return $this->_execute_multi_query($sql); }
- System / Databse / Drivers / mysqli_driver.php
Add the _execute_multi_query () function after the _execute () function.
function _execute_multi_query($sql) { $sql = $this->_prep_query($sql); $result_sets = array(); $k = 0; mysqli_multi_query($this->conn_id, $sql); do { $result = mysqli_store_result($this->conn_id); if($result) { $l = 0; while($row = mysqli_fetch_assoc($result)) { $result_sets[$k][$l] = $row; $l++; } $k++; mysqli_free_result($result); } } while(mysqli_next_result($this->conn_id)); return $result_sets; }
If I miss something or something is wrong, please correct me.
Thanks!
source share