updated getPopularBooks function in index.php to comply with the updated database schema