$db = new PDO("mysql:host=localhost;dbname=ad", "ad", "pass"); $db->query("SET CHARACTER SET utf8mb4");