[Gambas-user] problem with "&" and mysql

Marcelo Confortino mconfortino at ...1153...
Thu Feb 9 13:55:38 CET 2006


Andreas Fröhlke wrote:
> nigel at ...38... schrieb:
>> I can confirm that with gambas 1.9.24 and mysql 5 that
>> db.exec("Insert into tablename set fieldname = 'Hello && Goodbye')
>> works for me.
>>
>> Try setting DB.Debug = True prior to the statement to check what is
>> actually being passed to
>> mysql.
>>
>> Regards
>>
>> Nigel
>>
>>
>>
>>> Message Received: Feb 09 2006, 09:25 AM
>>> From: "Benoit Minisini" <gambas at ...1...>
>>> To: gambas-user at lists.sourceforge.net
>>> Cc: Subject: Re: [Gambas-user] problem with "&" and mysql
>>>
>>> On Thursday 09 February 2006 10:13, Andreas Fröhlke wrote:
>>>
>>>> the same error, without ";"
>>>
>>> Which database driver do you use?
>>>
>>> -- 
>>> Benoit Minisini
>>>
>>>
>>>
>>> -------------------------------------------------------
>>> This SF.net email is sponsored by: Splunk Inc. Do you grep through
>>> log files
>>> for problems?  Stop!  Download the new AJAX search engine that makes
>>> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
>>> _______________________________________________
>>> Gambas-user mailing list
>>> Gambas-user at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>>
>>>
>>
>>
>>
>>
>> -------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc. Do you grep through
>> log files
>> for problems?  Stop!  Download the new AJAX search engine that makes
>> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
>> http://sel.as-us.falkag.net/sel?cmd=k&kid3432&bid#0486&dat1642
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
> Hi,
>
> I set db.debug = true and here is the result:
>
> I send:
> INSERT INTO AfTest SET Text='Hello & Bye'
>
> mysql receives:
> mysql: 0x81b33b0: INSERT INTO AfTest SET Text='Hello INSERT INTO
> AfTest SET Text='Hello & Bye'
>
> This is very strange. I'Dont have an Idea to solve this problem.
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=k&kid3432&bid#0486&dat1642
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
Try:

    db.exec("insert into table (fieldname) values ('Hello & Bye')")

Marcelo.





More information about the User mailing list