I need some help on server side processing for datatable, i want to be able to handle over 300k records, and i was advised to use server side processing method

its my first time server side processing trying in perl

my main point is that, if i have PERL Script

my $INFO = $DBH->prepare("SELECT SND.ACC, M.ID, M.FULLNAME FROM U_REC as M JOIN U_USERS as SND ON SND.ACC = M.ID WHERE CASE WHEN (SELECT SUM(st +atus = ?) FROM U_REC) > 0 THEN M.status = ? ELSE M.status = ? OR M. +status = ? OR M.status = ? END ORDER BY created ASC"); $INFO->execute('new', 'ne1', 'ne2', 'ne3', 'ne4'); my (@data,$ACC,$ID,$FULLNAME); foreach (@data = $INFO->fetchall_arrayref()) { $ACC = $data[0]; $ID = $data[1]; $FULLNAME = $data[2]; }

Then how do i return results to html

<!doctype html> <html> <head> <meta charset="UTF-8"> <title></title> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.ne +t/v/bs-3.3.7/jq-3.3.1/dt-1.10.18/datatables.min.css"/> <script type="text/javascript" src="https://cdn.datatables.net/v/bs/jq +-3.3.1/dt-1.10.18/datatables.min.js"></script> <script type="text/javascript" src="https://stackpath.bootstrapcdn.com +/bootstrap/4.3.1/js/bootstrap.bundle.min.js"></script> <script> jQuery(function($){ $("#table_id").DataTable({ "processing": true, "serverSide": true, "ajax": "general/events/file.pl" }); }); </script> </head> <body> <h1>sample dataTable</h1> <table id="table_id" class="table table-hover"> <thead> <tr> <th></th> <th></th> </tr> </thead> <tbody> <tr> <td>Ex: (10123) #ID goes here</td> <td>Ex: (Jane Deo) #Fullname goes here</td> </tr> <tr> <td>Ex: (20911) #ID goes here</td> <td>Ex: (John Deo) #Fullname goes here</td> </tr> </tbody> </table> </body> </html>

In reply to Server-side processing? by frank1

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.