correcting the sql query for retreiving visible contents