导航首页 »  技术教程 »  PHP:pg_dbname()的用法_PostgreSQL函数
PHP:pg_dbname()的用法_PostgreSQL函数 1088 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
?>



文章评论 (0条)
发表评论
暂无评论,快来抢沙发吧~