Jump to content

mysql statement with 3 or's


carlfaulkner

Recommended Posts

Basically i want something like this SELECT * FROM table WHERE confirmed="1" and column1 like '%value%' or column2 like '%value' or column3 like '%value%' WHERE ....... I have a search bar and when clicking enter i want to search all rows where confirmed = 1 and any of the 3 other table columns are like the search string entered. Any ideas, but the above doesnt work. It does if i use just 2 or's

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...