meno19
asked on
Multiple MySql AND Statements
I know the syntax is not correct. How would I go about using multiple and statements?
SELECT * FROM `search` WHERE company_name LIKE '%pizza%'
and
latitude BETWEEN 38.69852058020537 AND 41.224260426268195
AND
longitude BETWEEN -75.97329101562502 AND -75.97329101562502
LIMIT 0, 25
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Dammit i figured it out, bringing in the wrong number for the search
That confirms that the syntax is correct. Maybe start with one clause first (the LIKE) and see if there are results. Then add the latitude filter and see what's left, then add the last filter.
ASKER