Php Jtable选项排序
我无法对选项进行排序,我不明白为什么。 代码很简单Php Jtable选项排序,php,jquery,jquery-jtable,Php,Jquery,Jquery Jtable,我无法对选项进行排序,我不明白为什么。 代码很简单 cliente: { title: 'Cliente', options: 'FattureActions.php?action=ragionisociali', optionsSorting: 'text', width: '20%' }, 在php页面上 //Get records for ragione_sociale else if($_GET["action"] == "ragionisociali") { //Get r
cliente: {
title: 'Cliente',
options: 'FattureActions.php?action=ragionisociali',
optionsSorting: 'text',
width: '20%'
},
在php页面上
//Get records for ragione_sociale
else if($_GET["action"] == "ragionisociali")
{
//Get records from database
$result2 = mysql_query("SELECT ragione_sociale, id FROM clienti");
//Add all records to an array
$righe = array();
while($row = mysql_fetch_array($result2)) {
$tmp = array();
$tmp['DisplayText'] = $row['ragione_sociale'];
$tmp['Value'] = $row['id'];
$righe[] = $tmp;
}
//Return result to jTable
$jTableResult['Result'] = "OK";
$jTableResult['Options'] = $righe;
print json_encode($jTableResult);
}
问题1:
为什么我不能在sql中使用order sytanx,比如$result2=mysql_查询(“SELECT ragione_sociale,id FROM clienti order by ragione_sociale”)??
问题2:
选项排序:“文本”无效
怎么了?
谢谢您的帮助。试试最新版本。旧版本没有排序选项。如有疑问,您可以由ragione_sociale DESC编写订单。谢谢Ravi Hirani,我已经更新了最后一个版本。现在一切正常,请尝试最新版本。旧版本没有排序选项。如有疑问,您可以由ragione_sociale DESC编写订单。谢谢Ravi Hirani,我已经更新了最后一个版本。现在一切都好了