CodeIgniter4-DataTables
CodeIgniter4-DataTables copied to clipboard
Use distinct() problem
I have problem with use distinct()
error in file DataTableQuery.php line 101 $value = $row->{$column->alias};
"Undefined property: stdClass::$f.firmname"
temporarily fixed it yes but i don't know if it's correct
$tmp = explode('.',$column->alias);
if(count($tmp) == 2) {
$column->alias = $tmp[1];
}
$value = $row->{$column->alias};
my query to datatable is:
$builder = $db->table('firms f') ->distinct() ->select('f.firmname, f.nip, f.pkd,f.id') ->where('f.deleted_at', NULL);
my query has several joins so I use "firms f"
sorry late reply, temporary you can use column alias to solve this, will fix later on next update. Thanks