i have to select from my homework dates from this time up to the next 2 months... i'm doing an expiration database.. pls help me
A:
select * from homework where homework_date between now() and now() + interval 2 month;
Paul Tomblin
2010-10-10 12:38:57
Error Code: 1064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE' at line 1
jzce
2010-10-10 12:59:52
@jzce - you have to change the column names to match your database.
Paul Tomblin
2010-10-10 13:09:53
Also, I left out an underscore the first time I posted it, but I fixed that 20 minutes before you posted your comment.
Paul Tomblin
2010-10-10 13:22:26