summaryrefslogtreecommitdiff
path: root/cdr/cdr_odbc.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2008-01-11 18:30:00 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2008-01-11 18:30:00 +0000
commited3007e7b32d64e8c54a87a7f3d45507012b4c33 (patch)
tree51c3c8fbca72b76975155ce5ee3e0c840c0cf79f /cdr/cdr_odbc.c
parentdca2eff288c9c3f2054d489298324d835714d445 (diff)
Commit Nick Gorham's suggestion for timestamp fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'cdr/cdr_odbc.c')
-rw-r--r--cdr/cdr_odbc.c4
1 files changed, 2 insertions, 2 deletions
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);