Forum Moderators: open
$query = "SELECT * FROM table2 WHERE family = '".$familynum."' AND title = 'Capo' OR title = 'Soldier' OR title = 'Associates'" or die ("This is the family query error: ".mysql_error());
Lets say $familynum = 4
So basically I want the record if $familynum = 4 AND the title equals one of the three listed above.
However, with the code above it pulls it if one of the last three conditionals are correct. So even if $familynum doesnt = 4 its still displaying it if say title = soldier.
Im not sure what I am doing wrong here...
Any help would be greatly appreciated!
MM