Added more code for displaying results of SQL queries