View Single Post

   
  #1 (permalink)  
Old 02-28-2008, 08:12 AM
howachen@gmail.com
 
Posts: n/a
Default UPDATE with GROUP BY

hi,


consider tables

1. blogs (id, num_article)
2. articles (id, blog_id)

is it possible to perform the query in the following statement?

update blogs, articles set blogs.num_article = count(*) where blogs.id
= articles.blog_id group by articles.blog_id

thanks.

Reply With Quote