sqlstate[42s22]: column not found: 1054 unknown column 'payments' in 'field list'
query(set names utf8);
// create the jqgrid instance
$grid = new jqgridrender($conn);
// write the sql query
$grid->selectcommand = 'select id,order_id,payments-date from `sale_orders`';
// set the ouput format to json
$grid->datatype = 'json';
// let the grid create the model from sql query
$grid->setcolmodel();
// set the url from where we obtain the data
$grid->seturl('grid.php');
// set alternate background using altrows property
$grid->setgridoptions(array(
rownum=>10,
sortname=>id,
altrows=>true,
multiselect=>true,
rowlist=>array(10,20,50),
));
// change some property of the field(s)
$grid->setcolproperty(id, array(label=>id, width=>60));
$grid->setcolproperty(payments-date, array(
formatter=>date,
formatoptions=>array(srcformat=>y-m-d h:i:s,newformat=>m/d/y)
)
);
// enjoy
$grid->rendergrid('#grid','#pager',true, null, null, true,true);
$conn = null;
?>
------解决方案--------------------
字段名是 payments-date 吗?中间有减号?
`payments-date`
