Select compare to current date

2004-06-28 Thread Robb Kerr
Need help with a SQL Select statement. I've got a table that consists of a list of years (1930-2014). I need to create a drop-down list on my page that consists of a list of years between 1930 and the current year. How do I construct this SELECT? See below... SELECT * FROM table WHERE

RE: Select compare to current date

2004-06-28 Thread David Rodman
]= ]=What's the syntax for year of current date? YEAR(NOW()) (rtfm..:-) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Select compare to current date

2004-06-28 Thread John Mistler
This one I can help you with: SELECT year-field FROM table WHERE YEAR(year-field) = YEAR(CURDATE()); - John on 6/28/04 4:49 PM, Robb Kerr at [EMAIL PROTECTED] wrote: Need help with a SQL Select statement. I've got a table that consists of a list of years (1930-2014). I need to create a