日期:2014-05-16 浏览次数:20702 次
function getData(page,value)
{
var keystr = $("#keyword").attr("value");
pageSize = $("#pagesize").attr("value");
var tableValue= $("#List_Tables").val();
$.ajax({
type:'POST',
url:'query_express.php',
data:{
'pageNum':page-1,
'pageSize':pageSize,
'uin':keystr,
'tableValue':tableValue,
'searchType':value
},
dataType:'json',
beforeSend:function(){
$("#tablelist").append("<p id='loading'>loading...</p>");
},
success:function(json){
$("#tablelist").empty();
total=json.total;//总记录数
curPage = page;//当前页
totalPage = json.totalPage;//总页数
var tr = "";
var list = json.list;
var headlist = new Array("UIN", "道具ID", "发货时间", "发货渠道", "发货数量", "发货IP");
var fieldlist = new Array("shipmentUin", "shipmentID", "shipmentTime", "shipmentChannel", "shipmentQuantity", "shipmentIP");
tr += "<tr>";
$.each(headlist,function(i, value){
tr += "<th>" + value + "</th>";
});
tr += "</tr>";
$.each(list, function(j, array){
tr += "<tr>";
$.each(fieldlist, function(k, value){
tr += "<td>" + array[value] + "</td>";
});
tr += "</tr>";
});
$("#tablelist").append(tr);
},
complete:function(){
//生成分页条
getPageBar();
},
error:function(){
alert("数据加载失败");
}
});
}
<?php
header("content-type:text/html;charset=utf-8");
include_once('conn1.php');
$page = intval($_POST['pageNum']);
$pageSize = intval($_POST['pageSize']);
$searchUin = intval($_POST['uin']);
$tableValue = intval($_POST['tableValue']);
$searchType = intval($_POST['searchType']);
$page = 0;
$pageSize = 10;
$searchUin = 812184336;
$tableValue = 1;
$searchType = 1;
$array_header=array("xx", "xx", "xx", "xx", "xx", "xx");
$array_field=array("xx", "xx", "xx", "xx", "xx", "xx");;
$tablename="expresssucshipmenttable";
$sql = "select * from ".$tablename." where shipmentUin = ".$searchUin;
echo $sql."<br>";
$result = mysql_query($sql);