Wrong index in class.database.php