Thanks, will give it a look and see if I can "compose" some queries this way.
On a side note, it would be a useful feature in Threads to see some of these queries made available in the CP. Stuff like looking up posts with a certain IP should be standard.
Something I requested some years ago to include some useful sql commands in the default zip file but it never happened.
Or at the very least a new forum with useful MYSQL queries.