Working MySQL Query. Trying to Display the query to frame.