0
我有問題刪除行,我想是因爲post [id]沒有被髮送。顯示刪除消息,但該行不會被刪除。這裏是我的代碼:刪除行Jtable jquery
JAVASCRIPT:
$(document).ready(function() {
$('#PersonTableContainer').jtable({
title: 'Tabla de Clientes',
paging: true,
pageSize: 10,
sorting: true,
defaultSorting: 'Nombre ASC',
actions: {
listAction: 'AccionesClientes.php?action=list',
createAction: 'AccionesClientes.php?action=create',
updateAction: 'AccionesClientes.php?action=update',
deleteAction: 'AccionesClientes.php?action=delete',
},
fields: {
id: {
key: true,
create: false,
edit: false,
list: false
},
PHP:
else if($GET["action"] == "delete")
{
//Delete from database
$result = mysqlquery("DELETE FROM clientes WHERE id= ".$_POST["id"].";");
//Return result to jTable
$jTableResult = array();
$jTableResult['Result'] = "OK";
print json_encode($jTableResult);
}
任何人都可以看到那裏的錯誤是什麼?