Jump to content

Reading material recommendation for generating dynamic tables


VelvetMirror
 Share

Recommended Posts

I would like to learn to do something like this: http://www.ribosomatic.com/ejemplos/ordenar_columnas/It's a table that can be sorted. It uses AJAX, PHP and MySQL for the database. The explanation it's here (it's in spanish): http://www.ribosomatic.com/articulos/196/o...con-php-y-ajax/But it's a bit overwhelming to me at the moment, so I would like to read and practice more examples / tutorials in order to understand how to do this. I've already readed all the material related to this in w3schools (PHP, MySQL, javascript, AJAX ...)So I hope someone can help me out and give me some useful links for reading material about this.

Link to comment
Share on other sites

That looks very inefficient. Since the system only works when JavaScript is enabled, it would make more sense to forget about the server and let JavaScript do the sorting.One way to do that is to read the table data into a 2-dimensional array. The first dimension indexes a row, and the second dimension is a 3-member array containing data from each column. Call the array's sort method, passing the method a callback function. The callback function does the work of sorting the rows depending on values in the selected column.It takes a while to figure out, and it is the same process you would go through on the server anyway. So you might as well do it locally.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...