Skip to content
Advertisement

DataTables can’t read more than one Data

I would like to ask why is the DataTable can’t read more than 1 data in my Database? I would appreciate any help since I’m relatively new with the Data Table, thank you.

As you can see it’s only showing 1 to 1 of 1 entries. But as seen in the table I have 5 retrieved data.

and when I am trying to search in the search bar this shows up. enter image description here

Here’s the code for the table.

JavaScript

Here’s my code for my plugins/cdn

JavaScript

Advertisement

Answer

I had to re-read my whole code for 3 times and the reason it only shows 1 is that the tbody was inside the loop, so it only sees 1. I had to move it outside the while loop so the data should be in one tbody thank you.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement