Hi
I'm doing a search on one or both of two fields, and I'd like to do a LIKE search, but all that happens is all the records in the database are selected, which is not the intended result!
The SELECTs look like this:
Company only:
$query="SELECT * FROM contacts WHERE company LIKE '".$search_company."%' ORDER BY company ASC";
Classification only:
$query="SELECT * FROM contacts WHERE classification LIKE '".$search_classification."%' ORDER BY company ASC";
Both:
$query="SELECT * FROM contacts WHERE company LIKE '".$search_company."%' or
classification LIKE '".$search_classification."%' ORDER BY company ASC";
What am I doing wrong, please?