Can DataTables be used to display content resulting after a search over database?
Can DataTables be used to display content resulting after a search over database?
iSumitG
Posts: 1Questions: 0Answers: 0
I am working on a e-commerce website. I want to show search results filtered by "Brand Name", "Price Range" etc. The results are first fetched from the database and then displayed over several numbered pages (like page1: results 1 to 20, page2: results 20-40) etc. Can I use DataTables to implement this functionality. Also can you please suggest where to start?
I am using PHP, MySQL, Apache server on a Windows Machine.
Thanks!
I am using PHP, MySQL, Apache server on a Windows Machine.
Thanks!
This discussion has been closed.
Replies
for the first option, you can either print your database results straight to HTML code (the table) or create an object with the data (array of arrays, for instance) and use that to intialize the table - see http://www.datatables.net/release-datatables/examples/data_sources/js_array.html
for javascript call to back-end server, see http://www.datatables.net/release-datatables/examples/server_side/server_side.html