I have a simple SQL Query in my PHP Code. The %search% is a input where the user is able to write something.
My problem is that the online = '0' gets ignored and there are also Data with online = '1'
$sql = "SELECT * from baw.entrys WHERE online = '0' and title like '%search%' or weight like '%search%' ORDER BY id DESC";
If I take the or away and leave my SQL Query like this it works.
$sql = "SELECT * from baw.entrys WHERE online = '0' and title like '%search%' ORDER BY id DESC";