Skip to content

Commit

Permalink
remove group by as it's not needed and mysql does not return 0 on "se…
Browse files Browse the repository at this point in the history
…lect count(*) .. group by .." when no records exist. (fix #509)
  • Loading branch information
haraldpdl committed Nov 20, 2016
1 parent 111edb3 commit d6d0d0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion catalog/admin/geo_zones.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ function update_zone(theForm) {

while ($Qzones->fetch()) {
if ((!isset($_GET['zID']) || (isset($_GET['zID']) && ((int)$_GET['zID'] === $Qzones->valueInt('geo_zone_id')))) && !isset($zInfo) && (substr($action, 0, 3) != 'new')) {
$Qtotal = $OSCOM_Db->prepare('select count(*) as num_zones from :table_zones_to_geo_zones where geo_zone_id = :geo_zone_id group by geo_zone_id');
$Qtotal = $OSCOM_Db->prepare('select count(*) as num_zones from :table_zones_to_geo_zones where geo_zone_id = :geo_zone_id');
$Qtotal->bindInt(':geo_zone_id', $Qzones->valueInt('geo_zone_id'));
$Qtotal->execute();

Expand Down

0 comments on commit d6d0d0e

Please sign in to comment.