<?php
$pdo = new PDO('mysql:host=localhost;dbname=leonzemaim', 'leonzemaim', 'leonzemaim');
$stmt = $pdo->prepare('SELECT * FROM Orders');
$stmt->execute();
?>
嗨。我尝试用utf8代码获取结果吗?
答案 0 :(得分:0)
只需将;charset=utf8
添加到您的连接字符串中即可。
$pdo = new PDO('mysql:host=localhost;dbname=leonzemaim;charset=utf8', 'leonzemaim', 'leonzemaim');