Wednesday, January 6, 2010

Where this SQL came from? Fixing app created by others

App I have to fix issues one query to get data for 20 photos, and then
issues 20 queries asking, one by one, for comment count on each of
those photos. However, every single visible place takes this number
from the result of first query. How can I find the line that issued
this find? I know this is find as I've grep'd thorough all code and
checked all ->sql( calls and that's not them. However, this page is
quite complicated and I fail to track those queries "by the thread to
the moot", as there is no thread, results aren't even used.

If you're about to tell me "rtfm" then I'll gladly do so, just gimme a
link or google search terms to get this fm. I failed after about an
hour.

Best regards
Molot

No comments: