From c83a3a5dc669b8447d7d8e7c49c1fa126dd13c5f Mon Sep 17 00:00:00 2001 From: emaktech Date: Fri, 14 Sep 2018 15:10:17 -0400 Subject: [PATCH] Allow Editing 48 Lines on device_edit Page (#3478) Similar to #3472 needed to allow up to 48 extension to be selectable and editable on the device_edit page. Additionally, fixed sorting issue so line numbers are correctly sorted sequentially (line number is stored as text field so needed to change cast in SQL query). --- app/devices/device_edit.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/app/devices/device_edit.php b/app/devices/device_edit.php index 31bcdf0175..dfef6d7411 100644 --- a/app/devices/device_edit.php +++ b/app/devices/device_edit.php @@ -392,7 +392,7 @@ //get device lines $sql = "SELECT * FROM v_device_lines "; $sql .= "where device_uuid = '".$device_uuid."' "; - $sql .= "order by line_number asc "; + $sql .= "order by cast(line_number as int) asc "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $device_lines = $prep_statement->fetchAll(PDO::FETCH_NAMED); @@ -937,6 +937,22 @@ echo " \n"; echo " \n"; echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; echo " \n"; echo " \n";