I'm using Ray Camdens CFYahoo package (http://cfyahoo.riaforge.org/
) to utilize the Yahoo Search API. As part of my flow, I'd like to reference a local database during screen output. For example, my local DB will include comments about sites (one of the fields in there could be the web url, for example Apple.com, which we could use to map against the API results).
I can successfully query and return results from the API, however I'm struggling with matching it up against the database. Whilst I can easily do a cfquery whilst looping through the results, with 10 results per page, this means incurring 10 cfqueries one after another - which to me seems incrediby inefficient.
To keep the output clean, I only want to show the actual comment count against each result, the user then has the option to view the comments if they wish. Of course, there will be an awful lot of results with no comments at all.
So, my question is - is there a way I can match these up with a single query before I output the page?