tap-cdr.c

This commit is contained in:
root
2025-01-22 21:53:19 +08:00
parent 6d9e440ec8
commit 48e5b94f1f
6 changed files with 28 additions and 7 deletions

View File

@@ -1266,12 +1266,9 @@ void clear_table(char *table_name)
return;
}
if (strstr(table_name, "cdrFromSGSN") != NULL) {
sprintf(mng_sqlstr,"delete from CDR_DB.%s WHERE TO_DAYS(changeTime)<TO_DAYS(NOW());",table_name);
}else{
sprintf(mng_sqlstr,"delete from CDR_DB.%s WHERE TO_DAYS(releaseTime)<TO_DAYS(NOW());",table_name);
}
if(mysql_getnores(pubConn,mng_sqlstr) != 0)
cdr_log("[ERR %d][clear_table]:%s",mysql_errno(pubConn),mng_sqlstr);