RE: Can I do this in a single SQL query?

2009-02-24 Thread William Seiter
Can you update the comments table when a new registration happens, with the userid that matches the email address? William -Original Message- From: Jim McAtee [mailto:jmca...@mediaodyssey.com] Sent: Tuesday, February 24, 2009 6:26 PM To: cf-talk Subject: Can I do this in a single SQL

Re: Can I do this in a single SQL query?

2009-02-24 Thread Matt Williams
On Tue, Feb 24, 2009 at 9:25 PM, Jim McAtee jmca...@mediaodyssey.com wrote: The new system requires user registration and new comments are now tied directly to a user account.  What I'd like to do is link any newly registered users to their old comments by using the email address.  It's

Re: Can I do this in a single SQL query?

2009-02-24 Thread Jim McAtee
- Original Message - From: Matt Williams mgw...@gmail.com To: cf-talk cf-talk@houseoffusion.com Sent: Tuesday, February 24, 2009 7:47 PM Subject: Re: Can I do this in a single SQL query? UPDATE comments SET userID = ( SELECT userID FROM users WHERE users.email = comments.email