Php If Variable Contains Function In Sql