1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > php连接与操作PostgreSQL数据库办法postgresql数据库

php连接与操作PostgreSQL数据库办法postgresql数据库

时间:2022-08-05 05:41:46

相关推荐

php连接与操作PostgreSQL数据库办法postgresql数据库

php教程|php手册

php,PostgreSQL,数据库,postgresql

php教程-php手册

php连接与操作PostgreSQL数据库的方法,postgresql数据库

最全的h5源码,ubuntu编译内核源码,两个Tomcat请求同一个,scrapy 爬虫小例子,php工作少工资低怎么办,柳州合肥seolzw

本文实例讲述了php连接与操作PostgreSQL数据库的方法。分享给大家供大家参考。

食品公司网站源码,vscode插件有内测版本吗,ubuntu 终端 方块,tomcat端口怎么找,爬虫有几类,php mysql 书籍,亚马逊运营要学seo优化吗,织梦政府网站模板下载lzw

具体实现方法如下:

行业门户b2b源码,VScode下载以前版本,移动ubuntu efi,tomcat总知道吧,爬虫walmart,php 字符串false,seo培训推荐打广告,商城网站模板app,餐饮管理系统的jsp模板lzw

复制代码 代码如下:

$pg=@pg_connect(“host=localhost user=postgres password=sa dbname=employes”)

or die(“can’t connect to database.”);

$query=”select * from employes order by serial_no”;

//$query=”insert into employes values(10008,’susan’,’1985-09-04′,’80’,’50’)”;

$result=@pg_query($pg,$query) or die(“can’t run query to table.”);

//echo pg_num_rows($result); //输出多少条记录被查询

//if($result)

//{

//echo “recrods inserted sucessfully!”;

//echo pg_affected_rows($result);//输出多少条记录被插入

//}

//实例一[pg_fetch_row]

echo “

“;

//实例二[pg_fetch_array]

//echo “

“;

//增加,删除,修改实例

//$newrow=array(“serial_no”=>”1006″,”name”=>”peter”,”birthday”=>”1990-07-03″,”salary”=>”90″,”bonus”=>”80″);

//$reusult=@pg_insert($pg,”employes”,$newrow) or die(“can’t insert data to table.”);

//if($reusult)

//{

//echo “rechords inserted sucessfully!”;

//}

//

pg_close($pg);

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。