yet another repeat

Sarah Reichelt sarah.reichelt at
Sat Jan 21 06:43:38 EST 2006

On 1/21/06, liamlambert <liamlambert at> wrote:
>   I would like to put the costumer detales into the fields
> userID,name,Phone.....ect
> with a repeat command but am stuck here
>    get fld "showID"
>    put it into tshowID
>    put "SELECT
> userID,name,phone,address,address1,address,email,showID FROM
> costumer" WHERE SHOWID = '" & tshowID & "'" into tSQLCostm
>    --> EXECUTE SQL
>    put revdb_querylist(,,gConID,tSQLCostm) into tListCostm
>    put tListCostm into fld "costumerlist"
>    put  "userID,name,phone,address,address1,address2,email,showID"
> into tFieldNames

Assuming the items in the SQL query come back tab-delimited, this is
what I would do:

put  "userID,name,phone,address,address1,address2,email,showID" into tFieldNames
replace comma with tab in tFieldNames  -- so they are also tab-delimited
set the itemDelimiter to tab

repeat with x = 1 to the number of items in tFieldNames
  put item x of tListCostm into fld (item x of tFieldNames)
end repeat


More information about the Use-livecode mailing list