List:General Discussion« Previous MessageNext Message »
From:Martin Ramsch Date:September 28 1999 3:46pm
Subject:Re: Using MySQL and PHP to store binary files
View as plain text  
On Mon, 1999-09-27 16:39:13 +0200, Marc Savard wrote:
> The problem is I have to handle characters like ", ' or \ that
> "disturb" PHP.

The PHP function AddSlashes does exactly the escaping as needed by
MySQL.

See chapter "7.1.1 Strings" of the MySQL Reference Manual,
and chapter "XLIX. String functions" of the PHP Manual.

A steady source of confusion regarding PHP and backslashes are the PHP
configuration options magiq_quotes_runtime and magic_quotes_gpc.
Best switch them off and do any needed quoting manually ...

Regards,
  Martin
-- 
Martin Ramsch <m.ramsch@stripped> <URL: http://home.pages.de/~ramsch/ >
PGP KeyID=0xE8EF4F75 FiPr=52 44 5E F3 B0 B1 38 26  E4 EC 80 58 7B 31 3A D7
Thread
Using MySQL and PHP to store binary filesMarc SAVARD27 Sep
  • Re: Using MySQL and PHP to store binary filesMartin Ramsch28 Sep