How to save oTable to MySQL
How to save oTable to MySQL
Pageii
Posts: 3Questions: 0Answers: 0
I've read through the doc and came across this qualifier:
[quote]Data is not saved to the server at the moment, just the local DataTables instance - so a reload takes the table back to it's original state. An XHR call to the server would be needed to save the user input information into a database (in saveRow).[/quote]
Question: how do you save the final edited data, in this case presumely the oTable instance, into an MySQL db?
Example: "customer_table" with unique id "id" and customer phone number "phone". The edited fields would "phone". After all the inline editing are done, how would you save all of the edited data to MySQL db? I hope to be able to save edited data either one row at a time (nRow) or the entire table (oTable) with multiple rows edited in a single click.
Sample codes would be greatly appreciated.
[quote]Data is not saved to the server at the moment, just the local DataTables instance - so a reload takes the table back to it's original state. An XHR call to the server would be needed to save the user input information into a database (in saveRow).[/quote]
Question: how do you save the final edited data, in this case presumely the oTable instance, into an MySQL db?
Example: "customer_table" with unique id "id" and customer phone number "phone". The edited fields would "phone". After all the inline editing are done, how would you save all of the edited data to MySQL db? I hope to be able to save edited data either one row at a time (nRow) or the entire table (oTable) with multiple rows edited in a single click.
Sample codes would be greatly appreciated.
This discussion has been closed.
Replies
There are lots of ways of doing it including jQuery's $.ajax method. That is how Editor works: http://editor.datatables.net .
Allan