Tree-shaped data stored in a MySQL database and retrieved by a PHP script