Convert sql request to datatables requires
Convert sql request to datatables requires
Before using DTs, I used that sql request:
SELECT ucp_request.id, ucp_request.admin_time, ucp_request.admin_time_id, ucp_request.create_time,(SELECT login FROM users WHERE id=ucp_request.admin_time_id), characters.name, users.login FROM ucp_request LEFT JOIN characters ON characters.id=ucp_request.characterid LEFT JOIN users ON characters.userid=users.id WHERE ucp_request.status=1
For now, I want to build the datatable, but I can't imagine how to convert this request to datatables requires.
My code for now:
Html: https://pastebin.com/ZG0Adkgb
Server-responce: https://pastebin.com/J96FrshF
This question has an accepted answers - jump to answer
Answers
Do you need server-side processing? Does your database contain tens of thousands or more records?
If so, then yes, that would need to be rewritten to use server-side processing (I suspect using an SQL VIEW would be the easiest way to do it). If no, then don't use server-side processing.
Allan