> 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. TQuery has a property SQL where sql statement is stored.
> The colon ':' means that fd is a parameter whose value should be
> inserted into TQuery.SQL statement just before executing the query.
> The solution is to substitute :fd with a real value directly by accessing
> Query.SQL.Add('select ...');
> Query.SQL.Add('where projects.closeddate between 01/01/01 and 01/01/02');
I very much doubt this works:
01 divided by 01 :-)
I guess you wanted to write:
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL