How to feed table from DB

How to feed table from DB

djluis48djluis48 Posts: 3Questions: 0Answers: 0

Hello! Im have a table that feeds from a Mysql db via PHP. Im trying to use DataTable with it, but i can't make it run. I place the javascript code on my footer, and include the DataTable.js and css files, and the only change it makes its a little styling, nothing more.

Heres the result of the DataTable debug: http://debug.datatables.net/icabov
Heres is the code of the table: http://jsfiddle.net/4tbz1ug4/

Can someone help me?

Replies

  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin

    That looks like it should work to me. If you "View source" in your page, what does the generated HTML form your PHP look like?

    Allan

  • djluis48djluis48 Posts: 3Questions: 0Answers: 0

    Hello! Thanks for answering me. To me, it looks like a normal table.

    Heres how it looks: http://i229.photobucket.com/albums/ee71/djluis48/DataTable.png

  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin

    Thank you.

    The problem is the second one of these:

    echo "<tr>";

    It should be closing the tag, rather than creating a new one...!

    Allan

  • djluis48djluis48 Posts: 3Questions: 0Answers: 0

    YOU ARE AWESOME! Dam...what a little mistake...Thanks a lot bro! It seems like its working fine now. :D

  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin

    Heh - no worries. You aren't the first with that one and won't be the last. I'll probably do it myself tomorrow...

    Allan

This discussion has been closed.