Re: R: Re: Elaborare query con molti record

Emanuele Cellini <[email protected]>
Newsgroups gmane.comp.cms.cold-fusion.devel.italian
Message-ID <[email protected]>
Ciao Marco,

in data martedì 24 aprile 2012, alle ore 15.52, hai scritto:

> Puoi spiegarmi meglio come si usa?

cfthread serve per elaborare parti di codice in "parallelo", puoi
vedere meglio l'utilizzo nella guida di CF.

Questo può essere un esempio dell'utilizzo nel tuo caso:

<cfquery name="elenco">
SELECT Id, Nome, Cognome
FROM xxxx
</cfquery>

<cfoutput query="elenco">
<cfthread name="tr_#Id#" nome="#nome#" cognome="#Cognome#" id="#id#">
<cfquery name="updatedati">
UPDATE XXXX
SET Nome = '#Attributes.Nome# #Attributes.Cognome#'
WHERE Id = #attributes.Id#
<cfthread>
</cfoutput>

Ricordati che dentro il cfthread non hai accesso alle variabili
definire nel CFM al di fuori del cfthread, se ti servono le devi
passare al cfthread (come ho fatto con nome, cognome, ecc)

Ciao

-- 
Emanuele Cellini
ColdFusion Developer




------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.