How do you export DataTables data to sql database
How do you export DataTables data to sql database
ddmenz
Posts: 3Questions: 1Answers: 0
Hi I would like to know how you can export all Datatables rows to an sql database. This was available in the legacy RowReorder Extension version using .rowReordering({ sURL:"UpdateRowOrder.php", sRequestType: "GET"});
This discussion has been closed.
Answers
The legacy plug-in you mention was third party, so I don't really know much about it and can't really comment on that aspect I'm afraid.
Could you explain a bit more about what you would like to do please? Do you want to click a button and it would submit the data to the server? If so, just use
rows().data()
to get the data from the table.Allan
Hi, thanks for the quick reply, Allan. I'd like to be able to reorder the rows and then save the new order to an SQL database. I have since been experimenting with editor and can see there is a way to edit the rows and them save them to a database. But I haven't found a way to save the order. I can now see that it was indeed a 3rd party plugin in reference to my previous post. I was wondering if this feature is built in to editor. Many thanks,
David
My own RowReorder extension has support for Editor built in. Example.
Allan
Hi thanks very much for such a brilliant script. I have now got that feature working. However I have one question; The rowReorder feature only seems to work on the first column regardless of what is in that column wheather it be a checkbox or a title. The reason I found this is because I wanted to give the user the option of primary editing as well as inline editing.
Using
select: true
I can only select the second or third column to give the option of a primary edit not the first. This can lead to a slightly confusing interface when primary and inline editing when reordering. Because a different row could highlighted to the one you are re-ordering, if you had selected it previously. I have tried changing thefields: [ {
label: 'Order:',
name: 'readingOrder' },
but it always seems to be the first column that is the one that makes the re-order.This doesn't really matter it was just something I noticed - what I need is to allow the selection of the first column ie the readingOrder column without editing so that when you re-order a row the one that has moved it the one thats highlighted. Thanks again...
I'd like to purchase the editor. I'd customise for my own cms, for things such as re-ordering posts, user tables and music playlists. It's great the breadth of examples and the api - It's saved me a lot of time. I look forward to using it in future projects.
RowReorder operates on a "data swap" basis. That is to say that only the data in the column designated (
rowReorder.dataSrc
) is modified - the other data for the rows is retained. The idea behind this is that it can be used with a sequence so only the sequence value is updated (example).RowReorder isn't really designed to just move DOM elements around - it is designed to modify the data on this basis.
Great to hear you are enjoying using Editor :-)
Allan