Re: Comparing date fields (Delphi programmers take note)

2003-12-18 Thread Martijn Tonies
Hi, Interesting. > Thanks for all those who helped me with this a few days ago (I've only now > had the chance to get back to programming). > > As someone correctly surmised, I am using Delphi and connecting to mySQL via > a TQuery (actually a TZQuery, via Zeos components). What I have discovere

RE: Comparing date fields (Delphi programmers take note)

2003-12-18 Thread Noamn
' + date2sql (edTillDate.text); open end; This works as it should. -Original Message- From: Martijn Tonies [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 4:47 PM To: [EMAIL PROTECTED] Subject: Re: Re[2]: Comparing date fields > mysql>> select projects.name fro

RE: Re[2]: Comparing date fields

2003-12-16 Thread Noamn
ember 16, 2003 4:47 PM To: [EMAIL PROTECTED] Subject: Re: Re[2]: Comparing date fields > mysql>> select projects.name from projects > JB> -> where projects.closeddate between :fd and :td; > JB> ERROR 1064: You have an error in your SQL syntax near ':fd and

Re: Re[2]: Comparing date fields

2003-12-16 Thread Martijn Tonies
> mysql>> select projects.name from projects > JB> -> where projects.closeddate between :fd and :td; > JB> ERROR 1064: You have an error in your SQL syntax near ':fd and :td' at > JB> line > JB> 2 > JB> What are those colons? > > He probably uses Delphi or C++Builder to connect to mysql via

Re[2]: Comparing date fields

2003-12-16 Thread DeBug
mysql>> select projects.name from projects JB> -> where projects.closeddate between :fd and :td; JB> ERROR 1064: You have an error in your SQL syntax near ':fd and :td' at JB> line JB> 2 JB> What are those colons? He probably uses Delphi or C++Builder to connect to mysql via TQuery component.

RE: Comparing date fields

2003-12-16 Thread Jay Blanchard
[snip] I started with "between", but when this didn't work, I switched to the comparison operators. mysql> select projects.name from projects -> where projects.closeddate between :fd and :td; ERROR 1064: You have an error in your SQL syntax near ':fd and :td' at line 2 [/snip] What are those

RE: Comparing date fields

2003-12-16 Thread Noamn
2 mysql> -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 4:04 PM To: Noamn; [EMAIL PROTECTED] Subject: RE: Comparing date fields [snip] I'm in the process of converting an application from Paradox to mySQL which is why I have these

RE: Comparing date fields

2003-12-16 Thread Jay Blanchard
[snip] I'm in the process of converting an application from Paradox to mySQL which is why I have these syntax questions. mySQL doesn't like a query with this syntax: select p.name, from projects p, ... where p.closeddate >= :fd and p.closeddate <= :td ... where fd ("from date") and td ("til

Comparing date fields

2003-12-16 Thread Noamn
I'm in the process of converting an application from Paradox to mySQL which is why I have these syntax questions. mySQL doesn't like a query with this syntax: select p.name, from projects p, ... where p.closeddate >= :fd and p.closeddate <= :td ... where fd ("from date") and td ("till date"