From c30141e10fb9eb9ff4be8fa87d49d3a86abe1a3d Mon Sep 17 00:00:00 2001 From: Ian Gilfillan Date: Mon, 11 Jul 2016 22:24:20 +0000 Subject: Sort each hardware category by compatibility --- h-source/Application/Include/myFunctions.php | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'h-source/Application/Include/myFunctions.php') diff --git a/h-source/Application/Include/myFunctions.php b/h-source/Application/Include/myFunctions.php index 903c013..c4a220b 100644 --- a/h-source/Application/Include/myFunctions.php +++ b/h-source/Application/Include/myFunctions.php @@ -124,13 +124,39 @@ function getOrderByClause($string) case 'compatibility': $orderBy = 'compatibility, hardware.id_hard desc'; break; + case 'compatibility-desc': + $orderBy = 'compatibility desc, hardware.id_hard desc'; + break; + case 'wifi-works': + $orderBy = 'wifi_works desc, hardware.id_hard desc'; + break; + case 'video-card-works': + $orderBy = 'video_card_works desc, hardware.id_hard desc'; + break; + case 'sound-card-works': + $orderBy = 'sound_card_works desc, hardware.id_hard desc'; + break; + case 'webcam-works': + $orderBy = 'webcam_works desc, hardware.id_hard desc'; + break; + case 'bluetooth-works': + $orderBy = 'bluetooth_works desc, hardware.id_hard desc'; + break; + case 'fingerprint-works': + $orderBy = 'fingerprint_works desc, hardware.id_hard desc'; + break; + case 'ethernet-works': + $orderBy = 'ethernet_card_works desc, hardware.id_hard desc'; + break; + case 'sdcard-works': + $orderBy = 'sd_card_works desc, hardware.id_hard desc'; + break; case 'undef': $orderBy = 'compatibility, hardware.id_hard desc'; break; default: $orderBy = 'compatibility, hardware.id_hard desc'; } - return $orderBy; } -- cgit v1.2.3