How to save oTable to MySQL

How to save oTable to MySQL

PageiiPageii Posts: 3Questions: 0Answers: 0
edited January 2014 in DataTables 1.9
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.

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,473 Site admin
    When you say "the doc" - do you mean this blog post: http://datatables.net/blog/Inline_editing ?

    There are lots of ways of doing it including jQuery's $.ajax method. That is how Editor works: http://editor.datatables.net .

    Allan
This discussion has been closed.