Hey guys.  I have a query that selects about 2,000 rows (by project id) from a table.  Then I use those values to compare with the same table using another query (but from a different project ID.  Any numbers that aren't the same are appended to a variable named error_list.  I'm basically using a CLOOP query using the first query to loop over the second query.  So it's basically like #firstquery.recordcount# loops and checking each value.  

pseudo code

<CFLOOP query="firstquery">

<CFQUERY name="secondquery">
SELECT name
from images
where project_id = #url.id# AND name = #name#
</CFQUERY>

<CFIF secondquey.recordcount EQ 0>
<CFSET error_list = listappened(error_list, name)>
</CFIF>

</CFLOOP>

<CFOUTPUT>#error_list#</CFOUTPUT>

Right now, it takes like minutes to get results!  Even if there's only 1 value in the list!  Is there a better way to do what I am doing?  Or some way to make it faster?  Cos this is slooooooooow!  Thankie!
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to