Skip to content

Commit

Permalink
Add limits to SQL for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
thekabal committed Mar 12, 2018
1 parent 20dd8f3 commit ef7fe8b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion beacon.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
}
elseif ($zoneinfo['allow_beacon'] == 'L')
{
$sql = "SELECT * FROM ::prefix::zones WHERE zone_id=:zone_id";
$sql = "SELECT * FROM ::prefix::zones WHERE zone_id=:zone_id LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':sector_id', $sectorinfo['zone_id'], PDO::PARAM_INT);
$stmt->execute();
Expand Down
2 changes: 1 addition & 1 deletion port.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
$sectorinfo['port_energy'] = 0;
}

$sql = "SELECT * FROM ::prefix::zones WHERE zone_id=:zone_id";
$sql = "SELECT * FROM ::prefix::zones WHERE zone_id=:zone_id LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':zone_id', $sectorinfo['zone_id'], PDO::PARAM_INT);
$stmt->execute();
Expand Down
2 changes: 1 addition & 1 deletion zoneedit.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
$trades = false;
}

$sql = "SELECT * FROM ::prefix::zones WHERE zone_id=:zone_id";
$sql = "SELECT * FROM ::prefix::zones WHERE zone_id=:zone_id LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':zone_id', $zone, PDO::PARAM_INT);
$stmt->execute();
Expand Down

0 comments on commit ef7fe8b

Please sign in to comment.