On Tue, Apr 1, 2008 at 10:34 AM, Bojan Tesanovic <btesanovic at gmail.com> wrote: > is there a way to do this with one SQL query ? Yes, and it looks like you have it. Unfortunately, it looks like mysql doesn't support it. -- Matt Warden Cincinnati, OH, USA http://mattwarden.com This email proudly and graciously contributes to entropy.