Skip to content

Commit bc6ddff

Browse files
committed
bugfix do not add table prefix if table name contains a dot
1 parent 2bfb6ca commit bc6ddff

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

MysqliDb.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,11 @@ public function get($tableName, $numRows = null, $columns = '*')
443443
$columns = '*';
444444

445445
$column = is_array($columns) ? implode(', ', $columns) : $columns;
446-
$this->_tableName = self::$prefix . $tableName;
446+
if (strpos ($tableName, '.') === false)
447+
$this->_tableName = self::$prefix . $tableName;
448+
else
449+
$this->_tableName = $tableName;
450+
447451
$this->_query = 'SELECT ' . implode(' ', $this->_queryOptions) . ' ' .
448452
$column . " FROM " . $this->_tableName;
449453
$stmt = $this->_buildQuery($numRows);

0 commit comments

Comments
 (0)