Array Looping to Insert into Database

Peter Haworth pete at lcsql.com
Tue May 14 18:24:31 EDT 2013


On Tue, May 14, 2013 at 2:30 PM, Graham Pearson <gspearson at gmail.com> wrote:

> repeat for each line L in tKeys
> answer info
> gAvailableMarketReceiveTowerDataArray[ReceiveTowers][L]["ID"] with "OK"
> end repeat
>

Hi Graham,
I think you missed [@attributes] as a key between [L] and [ID].

I'm guessing you don;t have any control over the format of this array but
just in case you do, I'd be more inclined to do something like this, mainly
to cut down on the number of nested keys:

gAvailableMarketReceiveTowerDataArray
  ReceiveTowers
    Market[10]
      ID                WHR769
     Towers
         1
            ID              KY-000001
            Address           951 Dixie Highway
            City              Louisville
            State             KY
            County
            TowerLatitude     38.2425270
            TowerLongitude    -85.7843640
         2
            ID              KY-000002
            Address           245 West Dixie Highway
            City              Elizabethtown
            State             KY
            County
            TowerLatitude     37.65959
            TowerLongitude    -85.8621


Pete
lcSQL Software <http://www.lcsql.com>



More information about the use-livecode mailing list