feature/avoid-repeating-places-in-game #38
@ -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