0

I have a table that has a week_start and week_end column, both INTs. They are between 1-52 for the weeks of the year. Is it possible to list all the weeks in between week_end and week_start?

Milen
  • 8,697
  • 7
  • 43
  • 57
user2337029
  • 627
  • 1
  • 6
  • 11
  • 3
    you could take a look on this question http://stackoverflow.com/questions/186756/generating-a-range-of-numbers-in-mysql – Yao Bo Lu Oct 24 '13 at 08:08

1 Answers1

0

This should work if you have a week field (not a week_start and week_end fields) in the database.

SELECT * FROM table WHERE week BETWEEN week_start AND week_end
Manolo
  • 24,020
  • 20
  • 85
  • 130