From ed3007e7b32d64e8c54a87a7f3d45507012b4c33 Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Fri, 11 Jan 2008 18:30:00 +0000 Subject: Commit Nick Gorham's suggestion for timestamp fix git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98268 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- cdr/cdr_odbc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cdr/cdr_odbc.c') diff --git a/cdr/cdr_odbc.c b/cdr/cdr_odbc.c index 4f7b5cdbd..af02d393c 100644 --- a/cdr/cdr_odbc.c +++ b/cdr/cdr_odbc.c @@ -74,12 +74,12 @@ static SQLHSTMT prepare_cb(struct odbc_obj *obj, void *data) snprintf(sqlcmd,sizeof(sqlcmd),"INSERT INTO %s " "(calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp," "lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield) " - "VALUES ('%s',?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", table, timestr); + "VALUES ({ts '%s'},?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", table, timestr); } else { snprintf(sqlcmd,sizeof(sqlcmd),"INSERT INTO %s " "(calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata," "duration,billsec,disposition,amaflags,accountcode) " - "VALUES ('%s',?,?,?,?,?,?,?,?,?,?,?,?,?)", table, timestr); + "VALUES ({ts '%s'},?,?,?,?,?,?,?,?,?,?,?,?,?)", table, timestr); } ODBC_res = SQLAllocHandle(SQL_HANDLE_STMT, obj->con, &stmt); -- cgit v1.2.3