0

This is my query. It show results but instead of name of the day it shows only number or id. How to change it?

SELECT challenger, challenged, day_id, date_match, CONCAT(term_start,' - ',term_end) 
AS term FROM barbara_schedule 
INNER JOIN barbara_days ON barbara_schedule.day_id = barbara_days.id_day 
ORDER BY date_match, term_start ASC 
Shahzad Barkati
  • 2,532
  • 6
  • 25
  • 33
Barbara
  • 1
  • 10
  • 2
    Your query will show only the columns that you include on the SELECT. – leonardo_palma Nov 28 '15 at 13:14
  • You need to show us the structure first. I guess you have a field called `day_name` so SELECT it as well. But I only can guess. Also select with alias name cos you might have same field names in both tables. Again, I only can guess without seeing the structure. – BentCoder Nov 28 '15 at 13:17
  • Thank you!! it is working! :) – Barbara Nov 28 '15 at 13:18

1 Answers1

1

You're only selecting day_id (from the table which I think also contains the actual day).

Add the name of the day column name to your query.

davejal
  • 6,009
  • 10
  • 39
  • 82