On Fri, 26 Jul 2002, Benjamin Pflugmann wrote:

> > is it possible to change the default string quoting chars ('")?
> > I'm using MySQL with an older shop solution. The data to write has
> > both: ' and " chararcters. It isn't possible to escape those
> > chars. Therefor I have to change the quoting char to a char
> > that isn't used i.e "#".
> >
> > Is it possible?
> Not by any normal mean. Only by changing the source and recompiling
> the MySQL server yourself.
>
> I am irritated. Why isn't it possible to change the escaping, but to
> change the quoting chars in the "shop" or the layer doing the SQL
> queries?
>
> Hm. You can change the quoting delimiters if you do not use SQL, but
> use LOAD DATA INFILE to read in a CSV delimited file.
It your program is SQL-compliant, as you indicate it as old, you might be
able to get to use some of the lesser known ANSI SQL syntax tricks that do
work in MySQL.

Eg the following query:
SELECT 'FOO''BAR';

This will return FOO'BAR on nearly every database system in existance, as
it has been around in all of the ANSI SQL declarations.

Your shop program should support that at the very least.

-- 
Robin Hugh Johnson
E-Mail     : [EMAIL PROTECTED]
Home Page  : http://www.orbis-terrarum.net/?l=people.robbat2
ICQ#       : 30269588 or 41961639



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to