If Else Condition In Mysql Query In Php