Uses 'select_all' for database query