Browse Source

Prevent potential bug

Tobias Reich 10 years ago
parent
commit
69bcd9932b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      php/modules/photo.php

+ 1 - 1
php/modules/photo.php

@@ -13,7 +13,7 @@ function getPhoto($photoID, $albumID) {
 
 	global $database;
 
-	$query	= "SELECT * FROM lychee_photos WHERE id = '$photoID';";
+	$query	= "SELECT * FROM lychee_photos WHERE id = '$photoID' LIMIT 1;";
 	$result = $database->query($query);
 	$return = $result->fetch_array();