Serverside processing....how to retrieve specific records from the database table

Serverside processing....how to retrieve specific records from the database table

saleemkhsaleemkh Posts: 6Questions: 1Answers: 0
edited March 2014 in General
Hi,

How can the datatable be filled from the records of a database table depending on where clause. e.g (all records where field1='5')

Thank you.

Replies

  • systematicalsystematical Posts: 23Questions: 0Answers: 0
    You should give a better description and code samples. Have you looked at server-side processing:
    http://datatables.net/release-datatables/examples/data_sources/server_side.html
  • saleemkhsaleemkh Posts: 6Questions: 1Answers: 0
    I am new to datatables but I have used server_side datatables already. Now my requirement is that I want to fill the datatable using server_side processing
    [code]
    $(document).ready(function() {
    $('#example').dataTable( {
    "bProcessing": true,
    "bServerSide": true,
    "sAjaxSource": "../server_side/scripts/server_processing.php"
    } );
    } );
    [/code]

    but I don't want to get all the records from database table. Rather some records matching SQL where clause.

    Thank you
  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    Your "server_processing.php" file should include the necessary query.
  • saleemkhsaleemkh Posts: 6Questions: 1Answers: 0
    Thank you. Its working...:)
This discussion has been closed.