diff options
author | ilja <ilja@7b491191-dbf0-0310-aff6-d879d4d69008> | 2004-03-15 09:27:39 +0000 |
---|---|---|
committer | ilja <ilja@7b491191-dbf0-0310-aff6-d879d4d69008> | 2004-03-15 09:27:39 +0000 |
commit | 89b318bcb8c06636723d1322109233b7e498d541 (patch) | |
tree | 80dbb8fea7ff7a714f3e8df56a33c762828bee40 /mysql | |
parent | d29f6a029dd5729b5abafa56461d94c17e8ae4df (diff) |
fixed TO_DATE string handling. MySQL needs quotes around the date string
(of course), but PostgreSQL should not have them around the
TO_TIMESTAMP() function. Fixed by putting the quotes in TO_DATE in
dbmysql.c
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1012 7b491191-dbf0-0310-aff6-d879d4d69008
Diffstat (limited to 'mysql')
-rw-r--r-- | mysql/dbmysql.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql/dbmysql.c b/mysql/dbmysql.c index 84a62c03..21876fdc 100644 --- a/mysql/dbmysql.c +++ b/mysql/dbmysql.c @@ -41,7 +41,7 @@ const char *TO_CHAR = "DATE_FORMAT(%s, '%%Y-%%m-%%d %%T')"; only available from MYSQL version 4.1.1 and up, using the str_to_date function. For now, we'll just let MySQL deal with the datetime it gets. It should be able to cope with it .. */ -const char *TO_DATE = "%s"; +const char *TO_DATE = "'%s'"; static MYSQL conn; /**< MySQL database connection */ static MYSQL_RES *res = NULL; /**< MySQL result set */ |