WHERE condition, does anyone find the solution?

WHERE condition, does anyone find the solution?

fredfred Posts: 2Questions: 0Answers: 0
edited June 2011 in DataTables 1.8
Hello everyone,

I have seen many problems with the WHERE condition, does anyone find the solution?

I have the same problem, my sql table contain information that only the customer can view or edit, the problem is that the table is fully loaded and if I put a condition ownerkey='$ownerkey' and unfortunately the search is on the table Complete.

I use php code "server_processing.php"

Here is my jquery code.

[code]
$(document).ready(function() {

$('.datatable').dataTable({
"bServerSide": true,
"bProcessing": true,
"sAjaxSource": "newgrid/scripts/server.php",
"fnServerData": function ( sSource, aoData, fnCallback ) {
aoData.push( { name: "ownerkey", value: "<?=$_SESSION['ownerkey']?>" } );
$.ajax( {
"dataType": 'json',
"type": "GET",
"url": sSource,
"data": aoData,
"success": fnCallback
} );
},
"aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
"bJQueryUI": false,
"aoColumns":[
{
"bVisible" : false
},
{"sWidth": "20%"},{"sWidth": "15%"},{"sWidth": "15%"},{"sWidth": "5%"},{"sWidth": "5%"},{"sWidth": "5%"},{"sWidth": "5%"},{"sWidth": "20%"}
],
"sPaginationType": "full_numbers"
}).makeEditable({
sUpdateURL: "newgrid/UpdateData.php",
sAddURL: "newgrid/AddData.php",
sDeleteURL: "newgrid/DeleteData.php",
sAddDeleteToolbarSelector: ".dataTables_length"

});
$("select, input:checkbox, input:radio, input:file").uniform();
});
[/code]

Thanks for all.

Replies

  • fredfred Posts: 2Questions: 0Answers: 0
    Hi,

    I find solution.

    [code]
    /* LINE 86
    $sWhere = "";
    if ( isset($_GET['sSearch']) && $_GET['sSearch'] != "" )
    {
    $sWhere = "WHERE (";
    for ( $i=0 ; $i intval($_GET['sEcho']),
    "iTotalRecords" => $iFilteredTotal, // HERE FOR MASK TOTAL ENTRY not necerrary for others customers
    "iTotalDisplayRecords" => $iFilteredTotal,
    "aaData" => array()
    );
    [/code]

    Is work very well now !

    Good luck.
This discussion has been closed.