Thanks for the page, the code looks pretty good to me. The only thing that I can think of is that the query is not returning the expected results. I have opened a ticket for you on this issue. To update the ticket login and visit your support history.
supporthistory.php