📄 get_data.php
字号:
<?
function showData()
{
//make your query here that selects all your data for the grid
//you have to modify the $res and fetch yourself to make the query succesfull
$res = $this->dbi->query('your query here');
while($obj =& $this->dbi->fetch())
{
$arr[] = $obj;
}
//encode your data for the jsonreader
echo $_GET['callback'].'({"total":"'.$rows.'","results":'.json_encode($arr).'})';
}
function saveData()
{
$data = json_decode(stripslashes($_POST['data']));
//make here a query that updates the database
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -