-
Anonymous
Получите с компиляцию SELECT Дает только начальную таблицу CodeIgniter 4
Сообщение
Anonymous »
Привет, ребята, getcompiled select in codeigniter возвращает только
select * из таблицы не имеет никаких соединений и где < /p>
Код: Выделить всё
if (!empty($requestArr)) {
$this->data['listings'] = $listingModel
->join('countries', 'listings.country_id=countries.country_id', 'LEFT')
->join('states', 'listings.state_id=states.state_id', 'LEFT')
->join('cities', 'listings.city_id=cities.city_id', 'LEFT')
->join('purposes', 'listings.purpose_id=purposes.purpose_id', 'LEFT')
->join('sub_purposes', 'listings.sub_purpose_id=sub_purposes.sub_purpose_id', 'LEFT')
->join('types', 'listings.type_id=types.type_id', 'LEFT')
->join('sub_types', 'listings.sub_type_id=sub_types.sub_type_id', 'LEFT')
->orLike('area',"%".$requestArr['area']."%")
->orWhere('listings.city_id', $requestArr['city_id'])
->orWhere('listings.state_id', $requestArr['city_id'])
->where('land_area', $requestArr['pSize'])
->where('land_unit', $requestArr['area_unit'])
->where('bedrooms', $requestArr['bedrooms'])
->where('bedrooms', $requestArr['bedrooms'])
->where('listings.purpose_id', $requestArr['purpose_id'])
->where('listings.type_id', $requestArr['type_id'])
->orderBy('listings.created_at', 'DESC')
->paginate(6);
echo $listingModel->getCompiledSelect();
echo json_encode($this->data['listings']);
Я хочу распечатать весь сгенерированный запрос, но дал только результат в приведенном ниже экране
Подробнее здесь:
https://stackoverflow.com/questions/676 ... eigniter-4
1745489546
Anonymous
Привет, ребята, getcompiled select in codeigniter возвращает только
select * из таблицы не имеет никаких соединений и где < /p>
[code]if (!empty($requestArr)) {
$this->data['listings'] = $listingModel
->join('countries', 'listings.country_id=countries.country_id', 'LEFT')
->join('states', 'listings.state_id=states.state_id', 'LEFT')
->join('cities', 'listings.city_id=cities.city_id', 'LEFT')
->join('purposes', 'listings.purpose_id=purposes.purpose_id', 'LEFT')
->join('sub_purposes', 'listings.sub_purpose_id=sub_purposes.sub_purpose_id', 'LEFT')
->join('types', 'listings.type_id=types.type_id', 'LEFT')
->join('sub_types', 'listings.sub_type_id=sub_types.sub_type_id', 'LEFT')
->orLike('area',"%".$requestArr['area']."%")
->orWhere('listings.city_id', $requestArr['city_id'])
->orWhere('listings.state_id', $requestArr['city_id'])
->where('land_area', $requestArr['pSize'])
->where('land_unit', $requestArr['area_unit'])
->where('bedrooms', $requestArr['bedrooms'])
->where('bedrooms', $requestArr['bedrooms'])
->where('listings.purpose_id', $requestArr['purpose_id'])
->where('listings.type_id', $requestArr['type_id'])
->orderBy('listings.created_at', 'DESC')
->paginate(6);
echo $listingModel->getCompiledSelect();
echo json_encode($this->data['listings']);
[/code]
Я хочу распечатать весь сгенерированный запрос, но дал только результат в приведенном ниже экране
Подробнее здесь: [url]https://stackoverflow.com/questions/67670578/get-compiled-select-gives-only-initial-table-codeigniter-4[/url]