I have a very crazy query I know, but when I run it it returns all matches regardless of whether or not field mvideo is empty or not.
the query is:
SELECT *
FROM `weaponsprojects`
WHERE mvideo != ""
AND credit7 = "' .$person. '"
OR credit2 = "' .$person. '"
OR credit3 = "' .$person. '"
OR credit4 = "' .$person. '"
OR credit5 = "' .$person. '"
OR credit6 = "' .$person. '"
OR credit1 = "' .$person. '"
OR credit8 = "' .$person. '"
OR credit9 = "' .$person. '"
OR credit10 = "' .$person. '"
OR credit11 = "' .$person. '"
OR credit12 = "' .$person. '"
ORDER BY usort'
and it returns when any of the credits equal the person but it completely ignores the mvideo part. Why is this??
Edit: the field is not NULL, just simply empty no spaces just blank
i think that the
WHEREcondition is logically flawed… you need some precedence here, like so:by adding the
(and the)we tell theWHEREstatement: “eithermvideois not empty and it matches one of theORstatements”