Any idea why my query is returning the article where priority is set to zero
when query is to select articles with priority greater than zero?
Without the AND clause it works, but I need the AND clause so I can't remove it.
myDatabase setting for 'priority' col
smallint(11) //values possible from form 0-9
test field values in database:
News test test 0
myQuery in php page:
$result = $mysqli->query("SELECT `headline`,`title`,`article`,`priority`
WHERE (`priority` > 0)
AND (`title` IS NOT NULL) OR (`article` IS NOT NULL)
Priority: 0 <--this article should not be selected
I also tried WHERE (priority >= 1)
which also didn't work