Frederick Cheung wrote: > On Apr 25, 1:57�am, Scott Kulik <[email protected]> wrote: >> updating the database when a users has problems with their private >> messages page. >> >> I'm wondering if someone knows a good way I could scan the the pm's >> table and delete messages that no longer have a user for sent_to or >> sent_from. >> > > sounds like a job for a left join. If I were you I'd also setup a > foreign key constraint so that this sort of thing can't happen in the > future > > Fred
Thanks Fred. The problem is i don't know the syntax for the join. Did you happen to know off the top of your head? -- 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.

