Skip to content

Instantly share code, notes, and snippets.

@code-poel
Created May 9, 2011 14:55
Show Gist options
  • Save code-poel/962668 to your computer and use it in GitHub Desktop.
Save code-poel/962668 to your computer and use it in GitHub Desktop.
Alternative Syntax for Selecting a MySQL Date Range
SELECT * FROM table WHERE created_on <= DATE_SUB( NOW(), INTERVAL 1 WEEK );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment