Basic execute method for queries