No cóż...
Więc tak, otwierasz plik ips_kernel\classDbMysql.php
Szukaj:
protected function _buildSelect( $get, $table, $where, $add_join=array(), $calcRows=FALSE )
{
Zamień na:
protected function _buildSelect( $get, $table, $where, $add_join=array(), $calcRows=FALSE, $prefix = null )
{
Szukaj:
$_calcRows = ( $calcRows === TRUE ) ? 'SQL_CALC_FOUND_ROWS ' : '';
Dodaj PO:
$prefix = ($prefix == null ? $this->obj['sql_tbl_prefix'] : $prefix);
Szukaj:
$_tables[] = $this->obj['sql_tbl_prefix'] . $tbl . ' ' . $alias;
Zamień na:
$_tables[] = $prefix . $tbl . ' ' . $alias;
Szukaj:
else
{
$table = $this->obj['sql_tbl_prefix'] . $table;
}
Zamień na:
else
{
$table = $prefix . $table;
}
Zapisz plik i wyślij.
Otwórz plik ips_kernel\classDb.php
Szukaj:
public function build( $data )
{
Zamień na:
public function build( $data, $prefix = null )
{
Szukaj:
$this->_buildSelect( $data['select'], $data['from'], isset($data['where']) ? $data['where'] : '', isset( $data['add_join'] ) ? $data['add_join'] : array(), isset( $data['calcRows'] ) ? $data['calcRows'] : '' );
Zamień na:
$this->_buildSelect( $data['select'], $data['from'], isset($data['where']) ? $data['where'] : '', isset( $data['add_join'] ) ? $data['add_join'] : array(), isset( $data['calcRows'] ) ? $data['calcRows'] : '', $prefix );Zapisz plik i wyślij.Teraz przy zapytaniu:
$this->DB->build( array(
'select' => '*',
'from' => 'm_tabela',
'order' => 'id ASC',
'limit' => array( $this->request['st'], 10 )
)
);
Dodajesz argument do funkcji np:
$this->DB->build( array(
'select' => '*',
'from' => 'm_tabela',
'order' => 'id ASC',
'limit' => array( $this->request['st'], 10 )
), 'moj_nowy_prefix'
);