Questions about DB_Common->quoteString();

From: Date: Fri, 29 Jun 2001 13:27:13 +0000
Subject: Questions about DB_Common->quoteString();
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-515@lists.php.net to get a copy of this message
Hello all, This my first post to this list, I am a developer for websites and online applications and have been programming PHP for more then 2 years now. We are currently implementing a website using the PEAR library, mainly because of it's database abstraction classes. When I was looking for a way to handle the quoting of strings independently of underlying database, I stumbled across the quoteString() method in the DB_common class. I'm fairly new to object oriented programming and I can't seem to figure the proper way to use this method in my database queries. I hope you can spare some of your time to help me with these issues; - quoteString() is a private method, does this mean that to enable my own objects to use this method they would all have to extend the DB class ? - to have different quoting for a certain database, I assume the method has to be overloaded like is done in DB/odbc.php . Nonetheless this is not done in DB/sybase.php which also uses a different way of quoting, is this an error ? - does PEAR/DB provide a similar construction to have abstract string delimiters for databases that don't use the common (') for this ? - why doesn't the quoteString() method add extra backslashes to escape any existing backslashes in the string, like addslashes() does ? Your help would be highly appreciated, thanks in advance for your time! Greets, Bas van Rooijen (pulse.interactive - http://www.pulse.nl/)

« previous php.pear.dev (#515) next »