The original query should not generate a syntax error. I just tried it. However, DATEDIFF(CURDATE(), xxx) will probably evaluate to TRUE for every record so the WHERE clause as written isn't useful.
Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 > -----Original Message----- > From: Duncan Hill [mailto:[EMAIL PROTECTED] > Sent: Monday, February 05, 2007 7:33 AM > To: mysql@lists.mysql.com > Subject: Re: Getting number days between 2 dates > > On Sunday 04 February 2007 17:24:29 Jim MacDiarmid wrote: > > I've been trying to figure this out using the CURDATE() > function, but I > > keep getting a syntax error. Below is the code I'm using: > > > > SELECT > > `vb_links`.`DateAdded` > > FROM > > `vb_links` > > WHERE DATEDIFF( CURDATE() , `vb_links`.`DateAdded` ); > > Normally, a WHERE condition says WHERE field = > [constant|function()|...] > > You have WHERE function(). > -- > Scanned by iCritical. > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]