Search box then display datatable with results

Search box then display datatable with results

funkeychikkinfunkeychikkin Posts: 2Questions: 0Answers: 0
edited June 2013 in General
Hi,

Is this possible to do, I would like to search my database for a term and then that query be the source of data for the datatable which I will then display on the page? Can anyone advise on the best way to do this if possible?

Also if the user then searches again for something different it would be able to get that new data for the datatable?

Sorry if this is simple, I am new to web development. Thanks for any help :)

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    http://datatables.net/release-datatables/examples/data_sources/server_side.html
  • aaronwaaronw Posts: 89Questions: 3Answers: 4
    I'm not sure what you mean. Do you mean that a user will search for 'Contoso' and then you will query a database called 'Contoso' ?
  • funkeychikkinfunkeychikkin Posts: 2Questions: 0Answers: 0
    No the query would just be SELECT * FROM table WHERE column_a = 'search_term' or something like that.

    It is just using that as the seed for the datatable that I am struggling with and all on the same page.
  • psharppsharp Posts: 39Questions: 0Answers: 0
    It's kind of the meat and potatoes part of the datatables plugin, especially when dealing with server side data requests.

    Here is a better example that will show how to set up a query by column, based on user input.
    http://www.datatables.net/examples/api/multi_filter.html
This discussion has been closed.