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

Sannyasin Brahmanathaswami brahma at hindu.org
Sat Dec 30 21:51:37 EST 2017


Ditto what Mike said: 

" On mysql..  can't you prebuild your multi-command transaction in a variable"

I periodically do this kind of thing. assuming the transaction is exactly the same… one way is to build a single SQL query from your data.

Assume you need something like this, getting and SQL query into a string, from raw data with LC's text processing tools is easy:

INSERT INTO `mytable` (item,quantity,amount)
VALUES
('Oranges',3,5.00)
('Apples',10,6.00)
#etc..
#(no problem doing 2000 of these)
;

and then do the insert as a single query/transaction and let the dBase handle it.
BR




On 12/29/17, 3:05 PM, "use-livecode on behalf of Mike Bonner via use-livecode" <use-livecode-bounces at lists.runrev.com on behalf of use-livecode at lists.runrev.com> wrote:

    
    (with a beginning and ending to the transaction) and then use revexecutesql
    with a single call for the one big transaction?



More information about the Use-livecode mailing list