You're query looks good, and I'm not in the mood to trace through your code. Do you have any debugging in your code that will let you print out the query with variables substituted in ? Then you can paste all that into phpmyadmin and see if you get results that way. Or cut them back in an email here..... Jeff