From 5bb4049f6df204ff3e63fde1c94eb28142bbf090 Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Sun, 24 Apr 2022 16:57:30 +0100 Subject: [PATCH] Add pagination --- client_services.php | 227 ++++++++++++++++++++++++-------------------- 1 file changed, 122 insertions(+), 105 deletions(-) diff --git a/client_services.php b/client_services.php index 77b43317..67ff903d 100644 --- a/client_services.php +++ b/client_services.php @@ -1,102 +1,116 @@ $sb, 'o' => $o))); + // Overview SQL query -$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM services WHERE service_client_id = '$client_id' AND (service_name LIKE '%$q%' OR service_description LIKE '%$q%')"); +$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM services + WHERE service_client_id = '$client_id' + AND (service_name LIKE '%$q%' OR service_description LIKE '%$q%' OR service_category LIKE '%$q%') + ORDER BY $sb $o LIMIT $record_from, $record_to" +); + $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); ?> -
+
-

Services

-
- -
+

Services

+
+ +
-
- - -
- -
- + + + +
+ +
+ +
+
+ +
+ +
+ + "> + + + + + + + + + + + $service_importance"; + }elseif($service_importance == "Medium"){ + $service_importance_display = "$service_importance"; + }elseif($service_importance == "Low"){ + $service_importance_display = "$service_importance"; + }else{ + $service_importance_display = "-"; + } + + ?> + + + + + + + + + + + -
-
NameCategoryUpdatedImportanceAction
+ - - -
+
- "> - - - - - + Action - - - - $service_importance"; - }elseif($service_importance == "Medium"){ - $service_importance_display = "$service_importance"; - }elseif($service_importance == "Low"){ - $service_importance_display = "$service_importance"; - }else{ - $service_importance_display = "-"; - } - - ?> - - - - - - - - - - - - - + } + ?> - -
NameCategoryUpdatedImportance
- -
-
+ + +
+
-
+
\ No newline at end of file