RE: [PHP] SQL syntax
| From: | Don Read | Date: | Thu, 26 Oct 2000 01:56:35 +0000 |
| Subject: | RE: [PHP] SQL syntax | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-22005@lists.php.net to get a copy of this message | ||
On 25-Oct-00 Lester June Cabrera wrote:
> If I need to insert a value with a single quotes, like:
>
> insert into table1 (content, status)
> values ('barron's', 1)
>
> What will I do so that the single quote will still be stored without
> generating error during SQL execution?
>
'barron\'s'
see the PHP addslashes() function (or DBI->quote() if you left with the others
to learn Perl)
Regards,
--
Don Read dread@texas.net
There are old sailors, and there are foolish
sailors; but damn few foolish, old sailors.
---------------------------------------------