LC Server - MySQL - update about 2000 rows/records of a table

Mark Schonewille m.schonewille at economy-x-talk.com
Sat Dec 30 06:34:24 EST 2017


The shell function can do this. I don't know if there could be a limit 
to the length of the shell command though.

Working example:

on mouseUp
    put shortfilepath("C:\Program Files\MySQL\MySQL Server 
5.6\bin\mysql.exe") into myFilePath
    -- the following line contains 2 insert commands
    put "insert into testtable (name) values ('Anne'); insert into 
testtable (name) values ('Belinda')" into mySql
    put myFilePath && "-uUSERNAME -pPASSWORD test -e" && quote & mySql & 
quote into myQuery
    get shell(myQuery)
end mouseUp

Kind regards,

Mark Schonewille
http://economy-x-talk.com
https://www.facebook.com/marksch

Buy the most extensive book on the
LiveCode language:
http://livecodebeginner.economy-x-talk.com

Op 29-Dec-17 om 21:53 schreef Matthias Rebbe via use-livecode:
> Hi,
> 
> i need to update regularly about 2000 rows/records of a MySQL table with Livecode Server.
> 
> What is better?
> Executing the 2000 update commands in one take using revexecuteSQL
> or should i execute one update command after each other within a repeat loop?
> 
> What do you think?
> 
> Regards,
> 
> Matthias
> 





More information about the Use-livecode mailing list