http://www.thetimekillers.com/eqemu/test.php
Works fine for me with a limited database to work with. I'll create multiple characters just to fuddle with when I get home tonight.
Took another look at it. Yeah, I don't need the timelaston or level in the select. Drop those and it's a more efficient statement.