Over on PHPBuilder.com this morning, there's a new piece from Tim Perdue that talks about moving the logic of your code into the database.
The example he gives is of a "task list" of sorts, giving examples of recursively marking tasks without the need of a recursive function on the PHP side of things. He focuses on using triggers and PL/SQL, but the ideas presented here are universal for any RDBMS out there that supports something like triggers.
It's a great idea that many coders overlook - mostly because a lot of them out there start with something lime MySQL. It's quick, it's easy, but it's also missing a few things. And triggers are a bit "more advanced" than just normal UPDATEs and SELECTs. And, if most PHP programmers are like I am, they have this drive inside of them that says "Yes, PHP can do that....I just have to figure out how!" and not really looking to other options first.




