I'll need FTP access to debug this. I don't see what the issue is. Have you tried adding this to the body:
<?php
var_dump($_GET);
echo($PageContents->debugSQL());
echo("<br>");
echo($Categories->debugSQL());
?>
I'd probably start with that to see if I could see what is wrong in the SQL statement. It appears no results are being returned to the recordsets.