Add a new row in Mysql DataBase

Add a new row in Mysql DataBase

BastouBastou Posts: 3Questions: 0Answers: 0
edited December 2011 in DataTables 1.8
Hi,

when i add a row in my table, my file AddData.php is never called. I follow the instructions from the page http://code.google.com/p/jquery-datatables-editable/wiki/AddingNewRecords and the demo http://jquery-datatables-editable.googlecode.com/svn/trunk/addingrecords.html.

this is my code

[code]

$(document).ready( function () {

var oTable = $('#example').dataTable({
"bJQueryUI": true,
"bProcessing": true,
"sPaginationType": "full_numbers",

}).makeEditable({
sAddURL: "AddData.php",
sDeleteURL: "DeleteData.php",
sAddDeleteToolbarSelector:".dataTables_length,
oAddNewRowFormOptions: {
title: 'Add a new entry',
show: "blind",
hide: "explode",
modal: true
},
"aoColumns": [
null,
null,
null,
{
indicator: 'Saving',
tooltip: 'Click to edit',
type: 'text',
sUpdateURL: "UpdateData.php",
},
null,
null,
null,
null,
null
]
});
});

[/code]

I forget something or i didn't understand something. If someone has ever had this problem ... Thanks

Replies

  • BastouBastou Posts: 3Questions: 0Answers: 0
    I change my code and now i work with server side processing and i can add a new row :) I don't know why i didn't do that before ...

    Thanks Allan for your work, it's a great pleasure to develop with DataTables !!!!
  • ColinRColinR Posts: 1Questions: 0Answers: 0
    Hello Bastou

    Can you help me i have problem to write my addData.php
  • BastouBastou Posts: 3Questions: 0Answers: 0
    Hey Colin,

    yes i can :). Can you explain to me your problem et can you post your code ?
  • al126al126 Posts: 1Questions: 0Answers: 0
    Hi Bastou,

    Can you post the changes you've made?

    Tq (=
  • allanallan Posts: 63,381Questions: 1Answers: 10,449 Site admin
    Hi Tq,

    You might be interested in Editor, a new plug-in that I've been readying for DataTables: http://editor.datatables.net . Not quite announced yet, it it will be very soon :-)

    Allan
  • hozthozt Posts: 45Questions: 0Answers: 0
    What the hell Allan :D
    Where have you been hiding that?

    Having to implement that on our own is always a pain in the ass.
    No competition after that.

    Looking so forward to it.. Jesus, what a hell of a nice work that editor :)

    Quick note: don't forget my PM :)
  • nafy007nafy007 Posts: 1Questions: 0Answers: 0
    Hi, I have the same problem, my AddData.php is never called. I'm using basic initialisation. DeleteData.php and UpdateData.php are called and work fine.
    Can you explain how you solve the problem?

    THx
  • neoplayneoplay Posts: 1Questions: 0Answers: 0
    i have the problem, that adding a record is not working. edit and delete works fine, but always if i try to add the record, i recieve an error:
    [quote]rowData is not defined
    rtn = oTable.fnAddData(rowData);[/quote]
    adddata.php returns the new record id.
    i do NOT use the server side processing. is this the problem? in examples there is also no serverside processing...

    my code:
    [code]
    $(document).ready( function () {
    var oTable = $('#table_id').dataTable().makeEditable({
    sUpdateURL: "ajax/update.cfm",
    sAddURL: "ajax/add.cfm",
    sDeleteURL: "ajax/delete.cfm"
    });
    });
    [/code]
This discussion has been closed.