tq: admin_level int

Signed-off-by: Varun Patil <varunpatil@ucla.edu>
pull/563/head
Varun Patil 2023-03-29 11:23:41 -07:00
parent 5f09ffd239
commit 4501d75b26
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ class PlacesBackend extends Backend
$query->select('e.osm_id', 'e.name', 'e.other_names', $count)->from('memories_planet', 'e');
// WHERE these are not special clusters (e.g. timezone)
$query->where($query->expr()->gt('e.admin_level', $query->createNamedParameter(0)));
$query->where($query->expr()->gt('e.admin_level', $query->createNamedParameter(0, \PDO::PARAM_INT)));
// WHERE there are items with this osm_id
$query->innerJoin('e', 'memories_places', 'mp', $query->expr()->eq('mp.osm_id', 'e.osm_id'));

View File

@ -76,7 +76,7 @@ trait TimelineQuerySingleItem
->from('memories_places', 'mp')
->innerJoin('mp', 'memories_planet', 'e', $qb->expr()->eq('mp.osm_id', 'e.osm_id'))
->where($qb->expr()->eq('mp.fileid', $qb->createNamedParameter($id, \PDO::PARAM_INT)))
->andWhere($qb->expr()->gt('e.admin_level', $qb->createNamedParameter(0)))
->andWhere($qb->expr()->gt('e.admin_level', $qb->createNamedParameter(0, \PDO::PARAM_INT)))
->orderBy('e.admin_level', 'DESC')
;