 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
giles
Joined: 04 Mar 2008 Posts: 2
|
Posted: Tue Mar 04, 2008 2:58 am Post subject: Replicating mysql_real_escape_string() in pear DB |
|
|
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 |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1048
|
Posted: Tue Mar 04, 2008 5:41 pm Post subject: Re: Replicating mysql_real_escape_string() in pear DB |
|
|
| 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 |
|
 |
giles
Joined: 04 Mar 2008 Posts: 2
|
Posted: Tue Mar 04, 2008 10:21 pm Post subject: |
|
|
thanks for that mark - I'll look into them
Best
G |
|
| Back to top |
|
 |
|
|
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
|
|