Jump to content

mySQL query not filtering


petenaylor

Recommended Posts

WHERE live = 1 AND title LIKE \"%$term%\" OR description LIKE \"%$term%\"

 

What do you want here?

WHERE (live = 1 AND title LIKE \"%$term%\") OR description LIKE \"%$term%\"

- or -

WHERE live = 1 AND (title LIKE \"%$term%\" OR description LIKE \"%$term%\")

 

Notice the change in parens.

Mike

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.