- COUNT(s2.id) AS pcount,
- MAX(b.updated) AS modified
+ MAX(GREATEST(b.modified, COALESCE(s2.created, 0), COALESCE(s2.updated, 0))) AS modified,
+ COUNT(s2.id) AS pcount
->addScalarResult('city', 'city', 'string')
->addScalarResult('latitude', 'latitude', 'float')
->addScalarResult('longitude', 'longitude', 'float')
->addScalarResult('city', 'city', 'string')
->addScalarResult('latitude', 'latitude', 'float')
->addScalarResult('longitude', 'longitude', 'float')
- ->addScalarResult('tcount', 'tcount', 'integer')
- ->addScalarResult('modified', 'modified', 'datetime');
+ ->addScalarResult('tcount', 'tcount', 'integer');
'miniature' => $this->translator->trans($data['title'].' miniature'),
'latitude' => $data['latitude'],
'longitude' => $data['longitude'],
'miniature' => $this->translator->trans($data['title'].' miniature'),
'latitude' => $data['latitude'],
'longitude' => $data['longitude'],
'pcount' => $data['pcount'],
'tcount' => $data['tcount'],
'pcount' => $data['pcount'],
'tcount' => $data['tcount'],
'slug' => $slug = $this->slugger->slug($title),
'link' => $this->router->generate('rapsysair_location_view', ['id' => $data['id'], 'location' => $slug])
];
'slug' => $slug = $this->slugger->slug($title),
'link' => $this->router->generate('rapsysair_location_view', ['id' => $data['id'], 'location' => $slug])
];
- MAX(l2.updated) AS updated,
+ MAX(GREATEST(l.created, l.updated, l2.created, l2.updated)) AS modified,
SUBSTRING(l.zipcode, 1, 2) AS city_id,
ROUND(AVG(l2.latitude), 6) AS city_latitude,
ROUND(AVG(l2.longitude), 6) AS city_longitude
FROM Rapsys\AirBundle\Entity\Location AS l
SUBSTRING(l.zipcode, 1, 2) AS city_id,
ROUND(AVG(l2.latitude), 6) AS city_latitude,
ROUND(AVG(l2.longitude), 6) AS city_longitude
FROM Rapsys\AirBundle\Entity\Location AS l
-JOIN Rapsys\AirBundle\Entity\Location AS l2 ON (l2.city = l.city AND SUBSTRING(l2.zipcode, 1, 3) = SUBSTRING(l.zipcode, 1, 3))
+JOIN Rapsys\AirBundle\Entity\Location AS l2 ON (l2.city = l.city AND SUBSTRING(l2.zipcode, 1, 2) = SUBSTRING(l.zipcode, 1, 2))
->addScalarResult('longitude', 'longitude', 'float')
->addScalarResult('indoor', 'indoor', 'boolean')
->addScalarResult('zipcode', 'zipcode', 'string')
->addScalarResult('longitude', 'longitude', 'float')
->addScalarResult('indoor', 'indoor', 'boolean')
->addScalarResult('zipcode', 'zipcode', 'string')
->addScalarResult('city_id', 'city_id', 'integer')
->addScalarResult('city_latitude', 'city_latitude', 'float')
->addScalarResult('city_longitude', 'city_longitude', 'float')
->addScalarResult('city_id', 'city_id', 'integer')
->addScalarResult('city_latitude', 'city_latitude', 'float')
->addScalarResult('city_longitude', 'city_longitude', 'float')
'latitude' => $result['latitude'],
'longitude' => $result['longitude'],
'indoor' => $result['indoor'],
'latitude' => $result['latitude'],
'longitude' => $result['longitude'],
'indoor' => $result['indoor'],
'around' => $this->translator->trans('around '.$result['title']),
'at' => $this->translator->trans('at '.$result['title']),
'atin' => $this->translator->trans('at '.$result['title']).' '.$this->translator->trans('in '.$result['city']),
'around' => $this->translator->trans('around '.$result['title']),
'at' => $this->translator->trans('at '.$result['title']),
'atin' => $this->translator->trans('at '.$result['title']).' '.$this->translator->trans('in '.$result['city']),