How can I use column filtering in PHP project

How can I use column filtering in PHP project

boxygenboxygen Posts: 1Questions: 1Answers: 0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:

https://datatables.net/extensions/fixedheader/examples/options/columnFiltering.html

On this page I can't see the HTML code.
Secondly how can I use this with a SQL query to fetch data from Database and show in the table
I am using PHP

Answers

  • rf1234rf1234 Posts: 2,990Questions: 87Answers: 421
    edited November 2023

    Here is a guy who does this all using Javascript / jQuery:
    https://datatables.net/forums/discussion/77547/creating-a-custom-filter-on-column-level#latest

    Of course you can also do this with HTML. That's how I am doing it. My stuff is extremely complex. Won't post it here ... Just search the forum, you should find somethng.

    Fetch data from database:
    I am doing this exclusively using Editor which costs a small license fee. Editor will also provide full editing support that you might not need here, but on other occasions. I am using Editor for read-only data tables and also for editable data tables. You may also do read-only using the so called ssp class. That's a bit more cumbersome. Good luck.

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    On this page I can't see the HTML code.

    That's odd. I'll look into that. For the time being, just right click and "View source". It is just a regular HTML table.

    In addition to rf1234's comment, I'd suggest you read the Ajax section of the manual to discover how to use Ajax sourced data with DataTables (the Ajax source can be PHP or any other server-side environment).

    Allan

Sign In or Register to comment.