refs #44 fix photo retrieval sql queries
This commit is contained in:
Родитель
d2fad23b37
Коммит
8406a942c3
|
@ -40,12 +40,12 @@ class GeophotoMapper extends Mapper {
|
|||
}
|
||||
|
||||
public function findAll($userId, $limit=null, $offset=null) {
|
||||
$sql = 'SELECT * FROM `*PREFIX*maps_photos` where `user_id` = ? and `lat` is not null and `long` is not null';
|
||||
$sql = 'SELECT * FROM `*PREFIX*maps_photos` where `user_id` = ? and `lat` is not null and `lng` is not null';
|
||||
return $this->findEntities($sql, [$userId], $limit, $offset);
|
||||
}
|
||||
|
||||
public function findAllNonLocalized($userId, $limit=null, $offset=null) {
|
||||
$sql = 'SELECT * FROM `*PREFIX*maps_photos` where `user_id` = ? and (`lat` is null or `long` is null)';
|
||||
$sql = 'SELECT * FROM `*PREFIX*maps_photos` where `user_id` = ? and (`lat` is null or `lng` is null)';
|
||||
return $this->findEntities($sql, [$userId], $limit, $offset);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче