Add missing LIMIT 1 to ajax edit items

This commit is contained in:
johnnyq
2025-02-18 20:29:36 -05:00
parent 6f8cc40167
commit 1dee1b4abb
15 changed files with 15 additions and 15 deletions

View File

@@ -4,7 +4,7 @@ require_once '../includes/ajax_header.php';
$item_id = intval($_GET['id']);
$sql = mysqli_query($mysqli, "SELECT * FROM invoice_items WHERE item_id = $item_id");
$sql = mysqli_query($mysqli, "SELECT * FROM invoice_items WHERE item_id = $item_id LIMIT 1");
$row = mysqli_fetch_array($sql);
$item_name = nullable_htmlentities($row['item_name']);
$item_description = nullable_htmlentities($row['item_description']);