Andvanced Filtering

Andvanced Filtering

cabosixpackcabosixpack Posts: 2Questions: 0Answers: 0
edited January 2013 in General
Hello, I've been using Datatables for around 3 months, first I started small, with some tables populated via PHP then rendered with Javascript and I found it so usefull that I completely integrated the server side functionality to my corporate system using server side processing, ¡It's amazing what I can do with it! so amazing, my boss is asking me to step it up a notch, by adding a filter wizard (Navicat filter wizard style) So the first thing that comes to mind is that the code in which I based my Datatable PHP Server side Object makes all the mysql filtering with :

[code]Where field '%like%'[/code]

And I need to implement filters like
[code]Where field > X[/code]
[code]Where field = X[/code]
[code]Where field IS NOT NULL[/code]
[code]Where field BETWEEN X AND Y[/code]

etc. So before trying to re-invent the wheel I was wondering if anyone has gone down the rabbit hole before me XD

Thanks in advance for your support!

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    I'm not a ware of a generic plug-in that will add SQL where options for DataTables I'm afraid. Filtering solutions for SQL like this tend to be fairly case specific.

    Allan
  • cabosixpackcabosixpack Posts: 2Questions: 0Answers: 0
    I'm not looking specifically for a plugin, only wanted to know if anyone has already implemented such a filtering and perhaps share an example of how they did it. I have a couple of ideas in mind using the callback function that handles the data send via ajax to add specific parameters for the filtering but i thought to ask first and see if anyone has fiddle with it.
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    I'd suggest using fnServerParams if you are going to add extra options to the Ajax call DataTables sends.

    Allan
This discussion has been closed.