Skip to content

Instantly share code, notes, and snippets.

@sixtyfive
Created May 21, 2011 11:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sixtyfive/984458 to your computer and use it in GitHub Desktop.
Save sixtyfive/984458 to your computer and use it in GitHub Desktop.
SELECT id,
TIMESTAMPADD(HOUR, 1, starts_on) AS starts_on,
TIMESTAMPADD(HOUR, 1, ends_on) AS ends_on,
user_id
FROM activity_years
WHERE YEAR(starts_on) = ? OR YEAR(ends_on) = ?;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment