Hi
I have a database that has a column named "SubCategory". Within the subcategory column there are 3 fields (Banks, Lenders, Realtors)I'm passing an URL parameter and what I'm trying to do is select certain fields only if the SubCategory ='Realtors' and the BankLocation='URL Parameter value"
So here is the query I have:
SELECT username, company, categories, profile, email
FROM freelancers_programmers
WHERE freelancers_programmers.SubCategory = 'Realtor' AND BankLocation = 'colname'
The 'colname' is a variable whose name is 'colname' has a default value of 1, and a runtime value of $_GET['BankLocation'] and it carries of the value of the selected state when passed
The problem I'm having is that the query isn't filtering the SubCategory='Realtors'....the search results come back with not only 'Realtors', but 'Banks' and 'Lenders' as well. I only want 'Realtors' whose 'BankLocation' is passed in the search.
If you need to see a live example visithttp://www.searchbanks.com//realtors.php
and use the "
Quick Search by States" section...Florida has the 'Realtor' and 'Alabama' has a lender but if you choose 'Alabama' the lender comes back in the search result....that shouldn't happen because I want to limit the search results on this page to 'Realtors' only for the selected state.
Thanks for your time and any advice😕