multi line Livecode field uploaded to MySQL

Tim Selander selander at
Sat Feb 16 01:59:54 EST 2019

I have a routine to take data from fields on a card and upload to 
a mysql database. Has worked well for years, got the original 
script off the Livecode learning site.
       # Construct SQL
       put "INSERT INTO 
& \
        " VALUES(" & tRowData & ")" into tSQL
        # Execute SQL
        put revdb_execute(gconnection,tSQL) into tTmp

        if the result is not 1 then
          put the result && tSQL & return after message
       end if

tRowData has the data from the card fields, comma delimited.

Now, I'm needing to upload fields with multiple lines. But the 
returns in the data mess it up. Tried enclosing the field data in 
quotes, like .csv files, but that didn't work either.

MySQL can handle multi-line text fields.... so how do I upload 
them from LC? Any hints greatly appreciated.

Tim Selander

More information about the Use-livecode mailing list