Skip to content

Commit 1b9bad8

Browse files
committed
Merge pull request #473 from avbdr/master
reword prepere() error. Fix for tableExists. Bump for 2.6 release
2 parents 3df726d + e3c63d0 commit 1b9bad8

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

MysqliDb.php

+5-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @copyright Copyright (c) 2010
1111
* @license http://opensource.org/licenses/gpl-3.0.html GNU Public License
1212
* @link http://github.com/joshcam/PHP-MySQLi-Database-Class
13-
* @version 2.6-master
13+
* @version 2.6
1414
*/
1515

1616
class MysqliDb
@@ -1493,7 +1493,7 @@ protected function _buildLimit($numRows)
14931493
protected function _prepareQuery()
14941494
{
14951495
if (!$stmt = $this->mysqli()->prepare($this->_query)) {
1496-
$msg = "Problem preparing query ($this->_query) " . $this->mysqli()->error;
1496+
$msg = $this->mysqli()->error . " query: " . $this->_query;
14971497
$this->reset();
14981498
throw new Exception($msg);
14991499
}
@@ -1868,11 +1868,10 @@ public function tableExists($tables)
18681868
return false;
18691869
}
18701870

1871-
array_walk($tables, function (&$value, $key) {
1872-
$value = self::$prefix . $value;
1873-
});
1871+
foreach ($tables as $i => $value)
1872+
$tables[$i] = self::$prefix . $value;
18741873
$this->where('table_schema', $this->db);
1875-
$this->where('table_name', $tables, 'IN');
1874+
$this->where('table_name', $tables, 'in');
18761875
$this->get('information_schema.tables', $count);
18771876
return $this->count == $count;
18781877
}

0 commit comments

Comments
 (0)