Код: Выделить всё
$model = new LocationModel();
$builder = $model->builder();
if($filterName != "" && $filterValue != "") {
$builder->where($filterName, $filterValue);
}
$data = [];
$data['locations'] = $model->findAll();
$data['recordCount'] = $model->countAllResults();
Подробнее здесь: https://stackoverflow.com/questions/796 ... or-a-query
Мобильная версия