From cc96ecb67f05b59d7515fa87fed3ef8b452d250d Mon Sep 17 00:00:00 2001 From: solocla Date: Fri, 27 Mar 2026 15:18:44 +0100 Subject: [PATCH] order parts by part_number --- public/userarea/export_to_lims.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/userarea/export_to_lims.php b/public/userarea/export_to_lims.php index b3522d7..1b5f833 100644 --- a/public/userarea/export_to_lims.php +++ b/public/userarea/export_to_lims.php @@ -107,9 +107,10 @@ try { // 🔹 STEP 3: Fetch Parts (including idmatrice and part id for custom fields) $stmt = $pdo->prepare(" - SELECT id AS part_id, part_number, part_description, material, color, mix, idmatrice, dateexpiry - FROM identification_parts - WHERE iddatadb = :iddatadb + SELECT id AS part_id, part_number, part_description, material, color, mix, idmatrice, dateexpiry + FROM identification_parts + WHERE iddatadb = :iddatadb + ORDER BY CAST(part_number AS UNSIGNED) ASC, part_number ASC "); $stmt->execute(['iddatadb' => $iddatadb]); $parts = $stmt->fetchAll(PDO::FETCH_ASSOC);