Fun with SSP

Fun with SSP

kthorngrenkthorngren Posts: 21,310Questions: 26Answers: 4,948

Figured I should learn more about SSP. For my backend code I use Python and not familiar with PHP. I could look through the PHP samples for my answers but I'm too lazy to figure out the PHP coding. I have basic SSP working with global searching and ordering. I have some general questions to finish out my basic code. My questions are based on using MySql syntax and typical DT operations. Please let me know if my assumptions are correct about how Datatables behaves.

  1. The parameter order[i][column], I assume i is the preference order of ordering if multiple columns are provided for ordering.
  2. I believe DT uses or when searching through columns.
  3. It seems the default DT search uses like for matching.
  4. If a global search is entered then a column search it appears DT replaces the global search for that particular column with the specific column search.

When would the need to check columns[i][orderable] come into play? I would think that if a column isn't orederable then a request to order that column wouldn't be sent. Or is it provided as a double check?

I realize I can handle search as I like but trying to create something that follows normal DT operations.

Kevin

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,480Questions: 1Answers: 10,467 Site admin
    Answer ✓

    1) Yes. The i is really just trying to show that its an array iterator.

    2) Sort of. For the global search, as long as any one column matches the search term, it will match the row. For the individual column search it is an AND filter.

    3) Yes. Its trying to behave the same way as the smart search on the client-side which is basically doing an indexOf to see if the search term is in the subject.

    4) No. It is combinative - the global search is still applied and is AND'ed with the individual column search.

    When would the need to check columns[i][orderable] come into play?

    Only if you want the client-side to control which columns can be ordered. It can be useful at times, but the majority of the time you'd probably want the server to define that. Its also a bit of a sanity check, but you are right - it isn't commonly used.

    Allan

This discussion has been closed.