Updated sql query in info controller