Server Side Managing Data

Server Side Managing Data

marcosmansuetimarcosmansueti Posts: 2Questions: 0Answers: 0
edited February 2014 in DataTables 1.9
Hello i've two issues.

First.

Not exists any documentation about server-side.php that manage Mysql inner joins. When I add for example $sInnerJoin and make the INNER JOIN SQL sequence the JSON comes empty.

Second.

I need get the ID of the row of the database for make actions, for example: delete. I need for delete.php?id=DATABASE ROW ID.

What it's the way for get that id in the following code?

[code]
// DATATABLE
var oTable = $('#datatable').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": valor_combo(), // TRAIGO LA URL DEL PHP
"bPaginate": true,
"iDisplayLength": 25,
"aLengthMenu": [[25, 50, 200, 500, -1], [25, 50, 200, 500, "Todos"]],
"sAjaxDataProp": "aaData",
"aoColumnDefs": [ {
"aTargets": [ 4 ],// CUENTA EL CERO TAMBIEN POSICION DE DONDE RENDERIZO LA PRIMERA
"bUseRendered": false,
"mRender": function (oObj) {
return 'AccionesMenuEditarDuplicarEliminar'; }
} ],
"aoColumns": [ // ANCHO DE COLUMNAS Y OPCIONES
{ "sWidth": "30%" },
{ "sWidth": "15%" },
{ "sWidth": "15%" },
{ "sWidth": "10%" },
{ "sWidth": "10%", "sClass": "center", "bSortable": false },
],
"oLanguage": { "sUrl": "../../js/jquery.datatables/lang/sp.txt" }
} );
[/code]


Thanks.

Replies

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    > 1. Not exists any documentation about server-side.php that manage Mysql inner joins.

    Indeed not. You need to modify the script to suit your needs. The example script is just that - an example.

    > 2. I need get the ID of the row of the database for make actions, for example: delete. I need for delete.php?id=DATABASE ROW ID.

    Can you not just put the correct link in the returned data?

    Allan
  • marcosmansuetimarcosmansueti Posts: 2Questions: 0Answers: 0
    Thanks Allan for your answer.

    2. In my script LINE 14 look delete.php?id=ROW DATABASE ID HERE . How can i get the ID of the db row ???
This discussion has been closed.