PDO连接mysql和pgsql数据库

$dsn="pgsql:host=127.0.0.1;port=5432;dbname=mail;user=postgres;password=postgres";
$m = new PDO($dsn);
$stmt = $m->query("select * from menu");
$rows = $stmt->fetchAll();
var_dump($rows);

posted @ 2020-07-04 11:01  又见江南  阅读(261)  评论(0编辑  收藏  举报