PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Replicating mysql_real_escape_string() in pear DB

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Database
View previous topic :: View next topic  
Author Message
giles



Joined: 04 Mar 2008
Posts: 2

PostPosted: Tue Mar 04, 2008 2:58 am    Post subject: Replicating mysql_real_escape_string() in pear DB Reply with quote

HI

I’m working on my first pear DB developement. I’ve come accross mysql_real_escape_string() which appears to be working fine with pear. Is this OK to do or is there something native to pear that would be better?

Thanks
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1011

PostPosted: Tue Mar 04, 2008 5:41 pm    Post subject: Re: Replicating mysql_real_escape_string() in pear DB Reply with quote

giles wrote:
I’m working on my first pear DB developement. I’ve come accross mysql_real_escape_string() which appears to be working fine with pear. Is this OK to do or is there something native to pear that would be better?


This function is a good choice, it is also used by the MySQL drivers of the DB and MDB2 PEAR packages. If you're using one of PEAR's database layer (like DB, MDB2 or packages like DB_DataObject or DB_Table), I'd recommend to use the provided quoting/escaping methods that these packages provide. This makes it easier to switch the DBMS later (this might happen sooner than one expects it ...).
Back to top
View user's profile Send private message
giles



Joined: 04 Mar 2008
Posts: 2

PostPosted: Tue Mar 04, 2008 10:21 pm    Post subject: Reply with quote

thanks for that mark - I'll look into them

Best
G
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Database All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software