[Gambas-user] anybody have a parser

Benoit Minisini gambas at ...1...
Wed Feb 15 12:07:12 CET 2006


On Wednesday 15 February 2006 07:51, Rob Kudla wrote:
> On Wed February 15 2006 00:25, johnf wrote:
> > Thanks for the response.  I'm using 1.9.24 and using
> > "DB.Quote(textarea.Text)" does not work for me.  Just adding a
> > " ' " (a single quote) to the text will cause the update
> > statement to fail.  The single quote is not escaped correctly.
> >  However, it does appear to work if the string is not
> > multi-line.
>
> Yeah, that's because DB.Quote (in gb.db.mysql, at least) seems to
> put the quoted string in backticks, so single quotes wouldn't
> hurt it.  Sticking backticks in your string, however, does cause
> DB.Quote to not work so well.  Same with putting in a newline.
> I'd call that a bug.

You mistake DB.Quote() with DB.Subst(). DB.Quote is used for quoting table and 
field names inside a query.

I update the documentation to make it clearer :-)

P.S. I cannot ssh to the documentation server anymore :-/

Regards,

-- 
Benoit Minisini





More information about the User mailing list