Quote:
If I add 'j.suspended' as here:
SELECT
j.title,
j.suspended
FROM
jobs AS j
WHERE
j.expire > NOW() AND
j.suspended IS NULL
It will return NULL for all fields of the "suspended" column, even if some entries are not NULL (those that are marked suspended by a datetime entry should be not null).
|
The AND in the query means it should return records where both conditions are true: j.expire > NOW() and j.suspended IS NULL. That means all of the records returned have j.suspended is null.
Quote:
|
My intention is clear to display just those jobs that did not expired and are not suspended.
|
I think that's what you're doing here. You're getting jobs where expire is after now and suspended is null.
If that's not what you want, can you explain in a little more detail what you want? I may not understand.