Over on CodeWalkers.com this morning, there's a new article dealing with the creation of a script to "normalize" all of their database connections and push/pull from it. And, no, it's not "Just Another DB Wrapper"...
In A Framework for Persisting Data Relationships (Jake Huffman), he uses a base class defining the connection, then uses the "extends" keyword in the PHP OOP layout to create a "subclass" of that master, making it easy for him to grab the information that he needs from the database. And, since there's only a few columns difference (the ID column remains the same), then it's easy to have the classes traverse the tables to grab whatever info is needed.
While his database structure lends itself well to using this kind of INSERT functionality, it can't necessarily be used much outside of it. But, it is a nice, simple way to be able to update/insert the values across multiple tables, and still keep it clean and easy to expand.




