Link to home
Create AccountLog in
Avatar of digarati
digarati

asked on

MYSQL OR Statement Help

$query = "select * from vendor where (businessname OR primarycontact OR estimatingcontact OR ownerofficercontact) like \"%$trimmed%\" order by businessname"; // EDIT HERE and specify your table and field names for the SQL query

I am new to using OR statements.
Is my syntax above correct, its returning no results.
If I do just businessname, I have results.
ASKER CERTIFIED SOLUTION
Avatar of elimesika
elimesika
Flag of Israel image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.