You are here: Re: Scrubbing MySQL Values and CSVtoArray() « PHP Programming Language « IT news, forums, messages
Re: Scrubbing MySQL Values and CSVtoArray()

Posted by Toby A Inkster on 08/17/07 10:38

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/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация