0

ı have a code like

 $(document).ready(function ()
    {
        $('#tbl-contact thead th').each(function () {
            var title = $(this).text();
            $(this).html(title+' <input type="text" class="col-search-input" placeholder="Search ' + title + '" />');
        });
        
        var table = $('#tbl-contact').DataTable({
                "scrollX": true,
                "pagingType": "numbers",
            "processing": true,
            "serverSide": true,
            "ajax": "server.php",
            order: [[2, 'asc']],
            columnDefs: [{
                targets: "_all",
                orderable: false
             }]
        });

        table.columns().every(function () {
            var table = this;
            $('input', this.header()).on('keyup change', function () {
                if (table.search() !== this.value) {
                       table.search(this.value).draw();
                }
            });
        });
    });

I want use this code for list and filter my database but my database is realy huge like 9 or 10 gb. this code auto load all database to screen after filterin database . if ı use that my computer can error :D . ı want just load 10 item. how can ı do that ?

2
  • Is this of any help? Commented Mar 12, 2021 at 16:05
  • yes ı want load just 10 item or not load all database first time . how can ı connect this to any button ? Commented Mar 12, 2021 at 16:56

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.