Re: [PHP-DB] Hello

[email protected] (Chris)
Newsgroups php.db
Message-ID <[email protected]>
Karl DeSaulniers wrote:
> What does this do exactly?
> Documentation was a bit fuzzy for me.
> Is it needed at all times to protect with?

Per the docs:

prepends backslashes to the following characters: \x00, \n, \r, \, ', " 
and \x1a.

So anything that has a null character, a newline (windows/linux/mac), 
single and double quotes and \x1a (not sure what that is) is escaped and 
ready to be put in a query.

If you don't quote those characters someone could put one of those 
characters in a query and cause problems - starting off with an invalid 
query but possibly ending up worse.

-- 
Postgresql & php tutorials
http://www.designmagick.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.