Php Array Check If Index Exists Sql Syntax For Multiple Where Condition