Skip to content

Commit

Permalink
Merge pull request #543 from haraldpdl/query_fix
Browse files Browse the repository at this point in the history
remove group by as it's not needed and mysql does not return 0 on "se…
  • Loading branch information
haraldpdl authored Nov 20, 2016
2 parents 8826f6b + d6d0d0e commit 4a0bdfa
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 4a0bdfa

Please sign in to comment.