blasterstudios
Technical User
I need to pull all records where the First letter of each word in the record begins with the entered variable. Here's my query:
This only pulls up a record that has 'l' as the first letter. I want it to find it if it's the first or last name. i.e.
l=j
Results:
John Doe
Bob Jones
Any suggestions?
Code:
"SELECT * FROM hgs_contacts WHERE name LIKE '".$_GET['l']."%'";
This only pulls up a record that has 'l' as the first letter. I want it to find it if it's the first or last name. i.e.
l=j
Results:
John Doe
Bob Jones
Any suggestions?