Re: escaping ' when inside a " "
| From: | David T-G | Date: | Mon, 17 Nov 2003 21:43:25 +0000 |
| Subject: | Re: escaping ' when inside a " " | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-170017@lists.php.net to get a copy of this message | ||
Adam --
..and then Adam Williams said...
%
% If I have the SQL statement:
%
% $sql = "select subject from subwhile where subject = '*$var[0]*'";
%
% do I need to put a \ before each '?
1) You should have just tried it.
2) No.
You owe the Newbie Guide a paragraph on quoting and escaping.
HAND
:-D
--
David T-G * There is too much animal courage in
(play) davidtg@justpickone.org * society and not sufficient moral courage.
(work) davidtgwork@justpickone.org -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur
Pbzzhavpngvbaf Qrprapl Npg!