Binary tree novels in PHP/SQL