put the whole query to a variable and print it. I think you need to give a space after the where clause
----------------------------------------------------------------------------------------------------------------------------------------------------
Roshan Joe
Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]