导航首页 » 技术教程 » PHP:pg_dbname()的用法_PostgreSQL函数
PHP:pg_dbname()的用法_PostgreSQL函数 136 2023-12-12   

pg_dbname

(PHP 4, PHP 5)

pg_dbname — 获得数据库名

说明

string pg_dbname ( resource $connection )

pg_dbname() 返回给定 PostgreSQL connection 资源的数据库名称。如果 connection 不是有效的 PostgreSQL 连接资源则返回 FALSE

Example #1 pg_dbname() 例子

<?php
    error_reporting(E_ALL);

    pg_connect("host=localhost port=5432 dbname=mary");
    echo pg_dbname(); // mary
?>


!!!站长长期在线接!!!

网站、小程序:定制开发/二次开发/仿制开发等

各种疑难杂症解决/定制接口/定制采集等

站长微信:lxwl520520

站长QQ:1737366103