replaced left join with inner join for older places search
All checks were successful
default-pipeline default-pipeline #169
All checks were successful
default-pipeline default-pipeline #169
This commit is contained in:
parent
3c6a7a3c5f
commit
8136273b33
@ -142,9 +142,8 @@ class PlaceRepository
|
|||||||
|
|
||||||
// count places that were visited at least once
|
// count places that were visited at least once
|
||||||
$selectOldPlaces = new Select(\Container::$dbConnection, 'places');
|
$selectOldPlaces = new Select(\Container::$dbConnection, 'places');
|
||||||
$selectOldPlaces->leftJoin($selectPlacesByCurrentUser, ['places', 'id'], '=', ['places_by_current_user', 'place_id']);
|
$selectOldPlaces->innerJoin($selectPlacesByCurrentUser, ['places', 'id'], '=', ['places_by_current_user', 'place_id']);
|
||||||
$selectOldPlaces->where('map_id', '=', $mapId);
|
$selectOldPlaces->where('map_id', '=', $mapId);
|
||||||
$selectOldPlaces->where('last_time', 'IS NOT', null);
|
|
||||||
$numberOfOldPlaces = $selectOldPlaces->count();
|
$numberOfOldPlaces = $selectOldPlaces->count();
|
||||||
|
|
||||||
// set order by datetime, oldest first
|
// set order by datetime, oldest first
|
||||||
|
Loading…
Reference in New Issue
Block a user