MySQL problem...

Jan Schenkel janschenkel at yahoo.com
Tue Aug 22 14:16:38 EDT 2006


--- Jean-Pierre Soto <jean-pierre.soto at wanadoo.fr>
wrote:
> hello,
> 
> I have a some problem with MySQL ,
> 
> this line work fine :
> 
>      revExecuteSQL IDdata,"insert into table1 values
> (5,'new word')"
> 
> but this one doesn't work , why ?
> 
>      revExecuteSQL IDdata,"insert into table1 values
> (:1,:2)",5,"new  
> word"
> 
> 
>   so i can't use "c'est beau l'amour" as new word
> because there is  
> confusion between quote and apostrophe ...
> 
> 	revExecuteSQL IDdata,"insert into table1 values
> (5,'c'est beau  
> l'amour')" Sig...
> 

Hi Jean-Pierre,

When you're using the data binding option of the revdb
library calls, you need to use variable names, not
their content:
##
on mouseUp
  global gConnectionID
  local tQuery, tFirstValue,tSecondValue
  put "INSERT INTO table1 VALUES(:1,:2)" into tQuery
  put 5 into tFirstValue
  put "c'est beau l'amour" into tSecondValue
  get
revdb_execute(gConnectionID,tQuery,"tFirstValue","tSecondValue")
end mouseUp
##

Of course, you can always escape the apostrophe in the
query by using a backslash, as JBV suggested.

Hope this helped,

Jan Schenkel.

Quartam Reports for Revolution
<http://www.quartam.com>

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the use-livecode mailing list