I’ve been searching around for hours looking at PEAR Structures_DataGrid with HTML_Table rendering, but it looks like the maintenance on Structures_DataGrid is not being kept up and MDB2 is getting pretty outdated and is SQL injection vulnerable as well.
I’m thinking there must be another library that accomplishes the following:
Uses PHP connecting to MySQL via a non-SQL-injection vulnerable interface (like PDO).
Allows you to bind in SQL Queries easily by passing the sql statement to a function and output the tabular results in an HTML table.
Extra options like pagination and formatting would be nice as well.
This seems like it should be a simple request which leads me to believe someone can help point me in the right direction quickly!
Pear has a package called HTML_Table which is lacking support and maintenance, but it is pretty much what I was looking for and an ok tradeoff between quick and dirty and rdlowreys concerns noted.
— Edit on this — its fine if you are using basic tables, but runs out of options quickly when formatting is important, so I’d suggest not using (see above reply to comments suggesting the same) this package. In short – you can quite easily replicate HTML_Table functionality yourself with all the functionality you require.
One limitation seen so far on HTML_Table – no table head / body differentiation, which impacts use on client plugins like Jquery plugins.