How to search for values in a table that have a many to one relation with the table that is shown

How to search for values in a table that have a many to one relation with the table that is shown

kaluosikaluosi Posts: 19Questions: 6Answers: 0

I need to search for values in a table that have a many to one relationship with the main table that is show with datatables. How can I send this search information to the php server side script? I will collect the search information in a form but how can i send the form information with the ajax call that is use to update the datatables?

This question has an accepted answers - jump to answer

Answers

  • jvretamerojvretamero Posts: 26Questions: 0Answers: 3
    Answer ✓

    You can use the ajax.data as a function, this way you "only" call ajax.reload() on the child table.

  • kaluosikaluosi Posts: 19Questions: 6Answers: 0

    Thank you jv!! It works sending the extra information. I am trying to make it works with POST:

    "ajax": $.fn.dataTable.pipeline({
    "url" : 'server_processing.php',
    "pages": 1, // number of pages to cache
    "type" : "POST",
    data: function ( d ) {
    d.extra_search = $("#formBusqueda").serialize();
    }

    But i am able only to recover the information with $_GET in the php side. Why? I don't know

This discussion has been closed.