yet another repeat
Sarah Reichelt
sarah.reichelt at gmail.com
Sat Jan 21 06:43:38 EST 2006
On 1/21/06, liamlambert <liamlambert at mac.com> 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
HTH,
Sarah
More information about the use-livecode
mailing list