it helps some times I have below query which return a result set for certain time interval, like 1 min, 10min, 1hour etc. [below is working e.g. for 10min.]
ORDER BY TransactionTime DESC
LEFT JOIN (
WHERE TransactionTime BETWEEN (NOW() - INTERVAL 10 MINUTE) and NOW()
ORDER BY TransactionTime ASC
mySQL select query does not return results when using a WHERE clause against a NULL column.
I wish did fix the issue. This behavior is caused by a three-value logic that is part of SQL standard. It means that every boolean condition can be evaluated to true, false or unknown and the row is returned only when the condition is true. It is defined that if there is a NULL value on one side of the equation (or both) then the result is unknown. In your case, the result of the condition is unknown when field3 is NULL. Therefore you need to use a solution proposed by jarlh:
SELECT * FROM table WHERE field3 <> 'randomstring' or field3 IS NULL