Load values ​​into the table after performing a query

Load values ​​into the table after performing a query

Noel91Noel91 Posts: 7Questions: 2Answers: 0
edited November 2022 in Free community support

Hello.

I am making a query from PHP to mysql, the result of that query I want to load in the datables table, so far I only got that it is reflected in the chain, but it is not drawn on the table.

in image 1, I have two fields to make a query when pressing the search button.

in image 2.
This is the java script that I am using.

I am starting in this area so my knowledge is basically null.


This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,343Questions: 26Answers: 4,954
    Answer ✓

    One problem is the "destroy": true, should cause a syntax error. Remove this line.

    I'm guessing you want the search fields to be used to filter the ajax data response. You will want to use ajax.data as a function to send the input values to the server. See this example. You don't need to use serverSide: true, for this to work.

    Kevin

  • Noel91Noel91 Posts: 7Questions: 2Answers: 0

    Thanks @kthorngren

    Regadrs,

Sign In or Register to comment.