Requested unknown parameter '0' for row 0

Requested unknown parameter '0' for row 0

bthbyglbthbygl Posts: 2Questions: 1Answers: 0

Hello guys,

Today I added a datatable to my current php project because it looks much better and is also functioning better now.

But when I added the datatable it gave me an error saying: DataTables warning: table id=example - Requested unknown parameter '0' for row 0. For more information about this error, please see http://datatables.net/tn/4 . I followed all these steps and also ran the DataTables Debugger and this is it. I can't make much of it because I'm not experienced with Datatables but I can use help. After I click the javascript alert message the Datatable shows the records of my database though.

Answers

  • allanallan Posts: 61,946Questions: 1Answers: 10,158 Site admin

    You have an empty row in your HTML for the table body:

            <tr role="row" class="odd">
            </tr>
    

    That is what is throwing the error. You'd need to remove that, or modify however you are generating the table to remove the empty row.

    Allan

  • bthbyglbthbygl Posts: 2Questions: 1Answers: 0

    Hello allan,

    I did look for a empty row in my HTML for the table body but couldn't find it are you sure there is an empty row ?

  • tangerinetangerine Posts: 3,350Questions: 37Answers: 394

    Look at "Full table state" on the Debugger output. You will find the empty row exactly as Allan posted above.

This discussion has been closed.