php - Select multiple equals from same table mysql -


creating database search system searches input value fixed element dropdown using php , mysql

e.g.

select * mytable fname '%input%' or lname '%input%' , city = 'dublin'; 

the problem last part being executed, results display dublin , ignores first part.

how structure query properly?

a or b , c may not evaluate want:

select 1 or 0 , 0; -- 1 

instead: (a or b) , c where:

select (1 or 0) , 0; -- 0 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -