Re: clean data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 27, 2008 at 9:53 PM, Micah Gersten <micah@xxxxxxxxxxx> wrote:

> In that case, I suggest you look to the MySQL lists for tips on handling
> data coming in.
>
> Thank you,
> Micah Gersten
> onShore Networks
> Internal Developer
> http://www.onshore.com
>
>
>
> blackwater dev wrote:
> > Yes, I agree but the code I am inheriting doesn't use abstraction
> > unfortunately.
> >
> > On Mon, Oct 27, 2008 at 9:38 PM, Micah Gersten <micah@xxxxxxxxxxx
> > <mailto:micah@xxxxxxxxxxx>> wrote:
> >
> >     Are you using MySQL abstraction?  That's the easiest way to
> >     control what
> >     data goes into your DB in a central place.
> >
> >     Thank you,
> >     Micah Gersten <http://www.onshore.com>
> >
> >
> >
> >     blackwater dev wrote:
> >     > I have a project now where we would like to properly remove
> >     unwanted data
> >     > before it goes into the db such as ` and of course slashes.  The
> >     problem is
> >     > I have tons of pages.  Is there an easy way to add in a clean up
> >     routine on
> >     > the db side to clean it going in and coming out without having
> >     to touch each
> >     > page that inserts it into the db and each page that presents it?
> >     >
> >     > I'm using a MySQL db.
> >     >
> >     >
> >     > Thanks!
> >     >
> >     >
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
I would take this as an opportunity to rewrite the db code by adding a
validation/cleansing/filtering code and then a single core place to interact
with the db. Start by doing this for maybe the most touched page for your
data and any new pages being created. Then slowly retrofit other pages as
you go in to make changes to them. Pretty soon you'll have a much simpler
system to support and making further changes to manipulate the data before
db interaction will be tons easier

-- 

Bastien

Cat, the other other white meat

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux