Datatables requested unknown parameter '0' for row 0

前端 未结 1 1294
名媛妹妹
名媛妹妹 2021-02-13 20:51

I\'ve got this problem when i try to get data from clients table in the database

DataTables warning: table id=example - Requested unknown parameter \'0\' for row

相关标签:
1条回答
  • 2021-02-13 21:31

    You need to specify the columns explicitly when using an array of objects instead of a two dimensional array.

    "columns": [
                    { "data": "id" },
                    { "data": "name" }
                  ]
    

    You can find more info here

    0 讨论(0)
提交回复
热议问题