
例如表中flag字段,默认为0,处理过之后就为1
这样,你才能判断哪条数据是新的,哪条数据是老的了
或者用时间判断
如果是sql server 可以用调度定时自动复制或更新到另一个数据库。ORECAl等其他大型数据库类似做法。
小型数据库的话只能编程了,比如delphi。用时间控件来实现
function showLogs(){
$("#table2").empty() //这是清空原来的数据
$.ajax({
type:"post",
url:"<%=request.getContextPath()%>/logs/queryLogsInfo.action",
dataType:"json",
success:function(data)
{
for ( var i = 0i <data.lengthi++)
{
$("#table2").append("<tr style='line-height:25px'>"
+"<td width='5%'>"+data[i].id+"</td>"
+"<td width='5%'>"+data[i].receive+"</td>"
+"<td width='8%'>"+data[i].data+"</td>"
+"<td width='10%'>"+data[i].dataLength+"</td>"
+"</tr>")
}
}
})
}
var t = setInterval("showLogs()", 1000) //隔1秒就查询一次数据
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)