Add function from nn db.php