I've created a thread in PHP application design that discusses perils and pitfalls of using SQL functions to offload business logic from the parsing code (PHP, ASP, .NET or whatever) into the database.
[thread=732275]This is the thread[/thread] and it is part of sitepoint.
Moderators are asked to close this thread. It exists only as a pointer. Please do not reply in this thread, instead reply in the one linked.