Код: Выделить всё
public function Get($Table, $where_Query = null, $GroupBy = null, $OrderBy = null, $Limit = null, $SpecificData = null, $OtherTable = null, $Where = null)
{
$result;
if ($SpecificData !== null)
$this->db->select($SpecificData);
else
$this->db->select('*');
if ($OtherTable !== null) {
foreach ($OtherTable as $pTable) {
$this->db->from($pTable);
}
} else {
$this->db->from($Table);
}
// where
if ($where_Query !== null)
$this->db->where($where_Query);
if ($Where !== null) {
foreach ($Where as $value) {
$this->db->where($value);
}
}
// group by
if ($GroupBy !== null)
$this->db->group_by($GroupBy);
//order group_by
if ($OrderBy !== null)
$this->db->order_by($OrderBy, 'desc');
// limit
if ($Limit !== null)
$result = $this->db->limit($Limit);
echo "";
print_r($this->db->get_compiled_select());
echo "";
$result = $this->db->get();
return $result->result();
}
Кроме того, когда я удалил строку $this->db->from($table) и поместил $table в get [вот так $this->db->get($table)], он дает мне все мои данные в базе данных, а не только тот, у которого имя пользователя = 'pogi' и пароль = 'pogi'.

Подробнее здесь: https://stackoverflow.com/questions/475 ... t-compiled
Мобильная версия