ADOdb

This is a discussion on ADOdb within the PHP Language forums, part of the PHP Programming Forums category; I'm interested in adopting ADOdb (actually ADOdb Lite) and have a simple question that I haven't been able ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2006
Tom
 
Posts: n/a
Default ADOdb

I'm interested in adopting ADOdb (actually ADOdb Lite) and have a
simple question that I haven't been able to quite pinpoint an answer
to.

I'm used to using the native mysql functions with
mysql_escape_string(). With ADOdb, is this handled transparently with
the execute method or should I take my own steps to sanitize input
data?

Also, one of the reasons I'm looking at ADOdb is I'd like to start to
explore postgreSQL. Are the security considerations with postgre
similar to mysql?

If you can point me in the right direction, I'll appreciate it.

Thanks,
Tom

Reply With Quote
  #2 (permalink)  
Old 04-19-2006
fletch
 
Posts: n/a
Default Re: ADOdb

> Also, one of the reasons I'm looking at ADOdb is I'd like to start to
> explore postgreSQL. Are the security considerations with postgre
> similar to mysql?


Yes. Pretty much. The permissions system is not the same, iirc.

Reply With Quote
  #3 (permalink)  
Old 04-20-2006
Juliette
 
Posts: n/a
Default Re: ADOdb

Tom wrote:
> I'm interested in adopting ADOdb (actually ADOdb Lite) and have a
> simple question that I haven't been able to quite pinpoint an answer
> to.
>
> I'm used to using the native mysql functions with
> mysql_escape_string(). With ADOdb, is this handled transparently with
> the execute method or should I take my own steps to sanitize input
> data?
>


When using adodb you should escape strings using the $db->qstr() method,
this will escape the string properly for the database type you use.

Data returned will be returned 'sanely', i.e. if slashes where added for
insertion into the database, they will be removed automagically.

Have a look at the adodb documentation, it's pretty detailed and
explains all this.

Grz, Jrf
Reply With Quote
  #4 (permalink)  
Old 04-20-2006
Tom
 
Posts: n/a
Default Re: ADOdb

Thank you for the responses. This helped.

In the event anyone else comes across this with the same question,
here's the ADOdb documentation:

http://phplens.com/lens/adodb/docs-adodb.htm

And on inserting:

http://phplens.com/lens/adodb/docs-adodb.htm#ex3

I also found the Wikipedia article on SQL injection useful (it mentions
ADOdb specifically):

http://en.wikipedia.org/wiki/SQL_injection#Remediation

Tom

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 12:09 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0