if(query)

changed the way to get the query…