MySql database

MySql database

SteagSteag Posts: 2Questions: 0Answers: 0

Hello,
I’m developping a website in which I use a basic pagination for outputting some tables from a MySql database.
I was searching for a more ‘fancy’ and easy way to accomplish.

However I can’t find an example how to use Datatables for pagination of a sql query. Only hardcoded tables which are not common in a real world Application.

I would appreciate if somebody could help me with my problem.
Thanks.

Replies

  • kthorngrenkthorngren Posts: 21,147Questions: 26Answers: 4,918

    Here are examples using ajax loaded data:
    https://datatables.net/examples/ajax/index.html

    An Ajax request is sent to your server script which, in turn, will perform the SQL query and return the response. You can use Datatables supplied scripts on the server or create your own.

    Kevin

  • SteagSteag Posts: 2Questions: 0Answers: 0

    Thanks a lot.
    However, it seems a bit to complicated.

  • rf1234rf1234 Posts: 2,938Questions: 87Answers: 415
    edited May 2019

    ... too complicated ...

    Maybe - But I think Kevin is right with his advice!

    If you buy an Editor license you'll find it a lot less complicated.
    No, I am not a marketer, just a satisfied user of Datatables Editor.

This discussion has been closed.