php 连接 postgre

最后更新于:2022-04-02 03:57:59

[TOC] ## 概述 ``` $host = "127.0.0.1"; $dbname = "demo"; $password = '123456'; $username ='postgres'; $dbh = new PDO("pgsql:dbname=$dbname;host=$host", $username, $password ); $dbh->exec("INSERT INTO on_hand VALUES (ROW('fuzzy dice', 42, 1.999), 1000);"); ```
';