Morgan Morgan wrote: [...] > well say i had 25 users, i'd be doing 25 querys right. one for each > user then looping through the results in basically the same way i was > doing it before?
Gosh, I hope not. :) Fetch it all in one query with lots of joins, then loop through the recordset in memory. In general, DB queries don't belong inside loops. Use the power of the database instead! Best, -- Marnen Laibow-Koser http://www.marnen.org [email protected] -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

