Skip to content

Commit 7ec9f66

Browse files
committed
Make prefix public
1 parent c4c0aa6 commit 7ec9f66

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

MysqliDb.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class MysqliDb
2424
*
2525
* @var string
2626
*/
27-
protected static $_prefix;
27+
public static $prefix;
2828
/**
2929
* MySQLi instance
3030
*
@@ -220,7 +220,7 @@ protected function reset()
220220
*/
221221
public function setPrefix($prefix = '')
222222
{
223-
self::$_prefix = $prefix;
223+
self::$prefix = $prefix;
224224
return $this;
225225
}
226226

@@ -333,7 +333,7 @@ public function get($tableName, $numRows = null, $columns = '*')
333333

334334
$column = is_array($columns) ? implode(', ', $columns) : $columns;
335335
$this->_query = 'SELECT ' . implode(' ', $this->_queryOptions) . ' ' .
336-
$column . " FROM " .self::$_prefix . $tableName;
336+
$column . " FROM " .self::$prefix . $tableName;
337337
$stmt = $this->_buildQuery($numRows);
338338

339339
if ($this->isSubQuery)
@@ -396,7 +396,7 @@ public function insert($tableName, $insertData)
396396
if ($this->isSubQuery)
397397
return;
398398

399-
$this->_query = "INSERT INTO " .self::$_prefix . $tableName;
399+
$this->_query = "INSERT INTO " .self::$prefix . $tableName;
400400
$stmt = $this->_buildQuery(null, $insertData);
401401
$stmt->execute();
402402
$this->_stmtError = $stmt->error;
@@ -439,7 +439,7 @@ public function update($tableName, $tableData)
439439
if ($this->isSubQuery)
440440
return;
441441

442-
$this->_query = "UPDATE " . self::$_prefix . $tableName;
442+
$this->_query = "UPDATE " . self::$prefix . $tableName;
443443

444444
$stmt = $this->_buildQuery (null, $tableData);
445445
$status = $stmt->execute();
@@ -464,7 +464,7 @@ public function delete($tableName, $numRows = null)
464464
if ($this->isSubQuery)
465465
return;
466466

467-
$this->_query = "DELETE FROM " . self::$_prefix . $tableName;
467+
$this->_query = "DELETE FROM " . self::$prefix . $tableName;
468468

469469
$stmt = $this->_buildQuery($numRows);
470470
$stmt->execute();
@@ -531,7 +531,7 @@ public function join($joinTable, $joinCondition, $joinType = '')
531531
die ('Wrong JOIN type: '.$joinType);
532532

533533
if (!is_object ($joinTable))
534-
$joinTable = self::$_prefix . filter_var($joinTable, FILTER_SANITIZE_STRING);
534+
$joinTable = self::$prefix . filter_var($joinTable, FILTER_SANITIZE_STRING);
535535

536536
$this->_join[] = Array ($joinType, $joinTable, $joinCondition);
537537

0 commit comments

Comments
 (0)