Completed the method to display a set of buttons
SQL query working correctly