Re: Scrubbing MySQL Values and CSVtoArray()
- From: Toby A Inkster <usenet200707@xxxxxxxxxxxxxxxxx>
- Date: Fri, 17 Aug 2007 11:38:50 +0100
Sanders Kaufman wrote:
I have a database.php file that does *all* of the database work, and
then a base class that does the business logic. But if I have to put
the mysql-specific scrubbing function in the business logic base class -
it defeats the purpose of putting ALL of the database work in database.php.
The solution is not to put the MySQL-scrubbing into the business logic
class, but to have the business logic class return an array (or,
even better: object) instead of a CSV string. Then the database class can
easily perform database-specific scrubbing mechanisms on the data before
inserting it into the database.
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 57 days, 14:16.]
Elvis
http://tobyinkster.co.uk/blog/2007/08/16/elvis/
.
- References:
- Scrubbing MySQL Values and CSVtoArray()
- From: Sanders Kaufman
- Re: Scrubbing MySQL Values and CSVtoArray()
- From: Rik
- Re: Scrubbing MySQL Values and CSVtoArray()
- From: Sanders Kaufman
- Scrubbing MySQL Values and CSVtoArray()
- Prev by Date: Re: serialisation db4o
- Next by Date: Re: i want a preview o a word document
- Previous by thread: Re: Scrubbing MySQL Values and CSVtoArray()
- Next by thread: lambda inside of lambda?
- Index(es):
Relevant Pages
|
Loading