I am having trouble with the following SQL statement. I have had this issue before but I can't remember how I fixed the problem. I am guessing the issue with this is that MySQL sees 0 as null? Note I didn't show the first part of the Select statement as it's irrelevant. My SQL works. It's showing rows with toffline that are = to 1 as well as 0...
FROM table1 AS tb1
LEFT JOIN table2 AS tb2 ON tb2.id = tb1.id2
LEFT JOIN table3 AS tb3 ON tb3.id = tb1.id3
AND tb1.toffline = 0
I have also tried AND NOT tb1.toffline = 1
also WHERE tb1.toffline = 0 all with the same result...