PDA

View Full Version : [PHP] TableModel Class



Sage_of_Fire
September 15th, 2008, 05:40 PM
Here's another simple class for making your life easier. I created TableModel to give me an easy way to turn a MySQL table into an HTML table. If you want to add database functionality to your site, but you don't have a lot of experience, this is the class for you. If you pass it a database connection, the table you want indexed, how you want it ordered, and the table's primary key, it will give you an HTML table; just wrap it in table tags and go!

You can find it here (http://evankroske.com/projects.php), along with a brief explanation, or just download it now and see for yourself.

Dom_
September 15th, 2008, 06:39 PM
nice idea, but, not to brag, tables are a little old school.
Maybe you should make it create div and such that could then be styled with css

nobody
September 15th, 2008, 06:51 PM
nice idea, but, not to brag, tables are a little old school.
Maybe you should make it create div and such that could then be styled with css

If it's tabular data it belongs in a table. Not to brag.

Sage_of_Fire
September 15th, 2008, 07:00 PM
I'm with 'nobody'; tables were designed for rows and columns of tabular data, but web designers desperate for precision layout twisted them into the hold-all do-all tag. This class was built for the proper use of tables.

Dom_
September 16th, 2008, 04:56 AM
You have a point.