When a post which is currently the last post for a category is being deleted, the last post info is not being updated.
So it will still display this post, although it is no longer there.
This leads to an infinite redirections-loop when you click the link.
Content visible to verified customers only.
doesn't look right to.
Never-Ever use unescaped data from user input in SQL queries, right?