Reply to Re: mysql_real_escape_string()

Your name:

Reply:


Posted by Rik on 08/05/07 20:09

On Sun, 05 Aug 2007 21:46:59 +0200, zach <wackzingo@gmail.com> wrote:

> Paul Lautman wrote:
>> zach wrote:
>>> The manual only said it needed an open connection, but didn't
>>> explain,(or not very clearly) why it needed it.
>> But Matt quoted from the manual the text:
>> "This is needed because the escaping depends on the character set in
>> use by the server."
>> This is in the first paragraph of the section in the manual.
>
> I read the PHP manual and it said nothing about this, it only mentioned
> that in the mysql manual.I am writing a PHP script and so I looked in
> the PHP manual. Who would have thought that writing a script in PHP,
> people would expect you to look to other manuals for information.

Euhm:
<http://www.php.net/mysql_real_escape_string>

[quote]
....
Escapes special characters in the unescaped_string, taking into account
the current character set of the connection so that it is safe to place it
in a mysql_query().
....
link_identifier

The MySQL connection. If the link identifier is not specified, the last
link opened by mysql_connect() is assumed. If no such link is found, it
will try to create one as if mysql_connect() was called with no arguments.
If by chance no connection is found or established, an E_WARNING level
warning is generated.
[/quote]

Well, it's all there, the character set, the connection, the opening of an
anonymous one... I knew it and I have never read the portion in the MySQL
manual that mentions the use of mysql_real_escape_string.

I guess reading is an art.
--
Rik Wasmus

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация