-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
At 5:41 AM -0700 5/18/01, E B wrote:
>Hi
>
>I have a problem which I am sure there is an easy
>solution to but I just can't find it.
>
>I use DBI and when I write to MySQL a string
>containing ' (for example the word can't) I get this
>error.
As someone suggested, you can use placeholders. But you can also use
the quote() method on DBI to quote any arguments before you pass them
in.
Note that if these arguments are coming from a user, some type of
quoting is critical or you are going to open yourself up to security
problems.
You also may want to checkout DBIx::Recordset. You'll lose a little
in efficiency, but gain a lot in easy of use (including automatic
quoting).
- --
Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBOwVokCZsPfdw+r2CEQIZzACgodOrG6bWf4/Z38BK/vobrvjZX+oAoJIi
GlvM7B/Qg5PQks+Wzb1y1pMz
=+hNj
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]