I am trying to use a search function that brings up a table that filters only the customer's name that was searched for. The customer's name is in the URL and grabbed by the PHP and assigned as $customer. My problem is, I want people to be able to search for the customer without matching the case sensitivity.
Here is the code for my table and where the table filter is set. I'm using an external function for the table itself, so all that is set here is the filters and columns.
<?php
if (isset($_GET['jobID'])) {
$jobID = $_GET['jobID'];
echo "<table class='auto details' id='jobs' data-type='table' data-other='groupBy=jobID' data-filter='jobs.jobID=".$jobID."' data-columns='jobID,customerName,notes,jobStatus,pallets'></table>";}
if (isset($_GET['invoiceID'])) {
$invoiceID = $_GET['invoiceID'];
echo "<table class='auto details1' id='invoices' data-type='table' data-other='groupBy=jobID' data-filter='jobs.invoiceID=".$invoiceID."' data-columns='jobID,customerName,notes,jobStatus,pallets'></table>";}
if (isset($_GET['customerName'])) {
$customer = $_GET['customerName'];
echo "<table class='auto details1' id='customer' data-type='table' data-other='groupBy=jobID' data-filter=\"jobs.customerName='$customer'\" data-columns='jobID,customerName,machineName,notes,jobStatus,pallets'></table>";}
?>
Is there a way to make the case in any of $customer not matter??
EDIT:
Here is the SQL query being sent out:
SELECT jobs.jobID, jobs.customerName, jobs.jobStatus, jobs.invoiceID, jobs.commissionDT, stafflist.staffName, machinelist.machineName, machinelist.machineID, MAX(operations.operation) AS operation, MAX(operations.completeTime) AS completeTime, operations.operationStatus FROM jobs INNER JOIN operations ON operations.jobID=jobs.jobID LEFT JOIN stafflist ON operations.staffID=stafflist.staffID LEFT JOIN machinelist ON machinelist.machineID=operations.machineID WHERE jobs.customerName='$customer' GROUP BY jobID ORDER BY jobs.jobID,operations.operation