当前位置>主页 > 期刊在线 > 信息技术 >

信息技术2019年3期

简述在PHP 中使用PDO 的方法
雷卫
(大连市技师学院,辽宁 大连 116100)

摘  要:PHP 是开发动态网站使用较多的脚本语言,支持多种数据库系统,与流行的开源数据库MySQL 能实现完美结合。 PDO 是PHP 数据对象,主要用于PHP 连接数据库,PDO 是数据抽象层,可以让程序员更加简便地使用数据库,提高工作效率, 是PHP 处理数据库的发展趋势。本文主要阐述PHP 使用PDO 处理数据库的方法,包括对数据库表进行基本的记录添加、删除、 修改和查询。读者通过本文给出的相应的可运行代码,可以快速建立自己代码库,提高开发效率。


关键词:PHP;PDO;数据库



中图分类号:TP311.1        文献标识码:A        文章编号:2096-4706(2019)03-0020-02


Brief Description of Using PDO in PHP

LEI Wei

(Dalian Technician Institute,Dalian 116100,China)

Abstract:PHP is a scripting language used to develop dynamic websites. It supports a variety of database systems. It is a perfect combination with MySQL which is a popular open source database. PDO is a PHP data object,which is mainly used to connect database with PHP. PDO is a data abstraction layer. It can make programmers use database more easily and improve work efficiency. It is the development trend of PHP database processing. This paper mainly elaborates the method of using PDO to process database in PHP, including adding,deleting,modifying and querying basic records of database tables. Readers can quickly build their own code base and improve the development efficiency through the corresponding runnable code given in this paper.

Keywords:PHP;PDO;database


参考文献:

[1] 席晓桃. 浅谈PHP 在电子商务网站建设中的研究与应用 [J]. 办公自动化,2018,23(17):29-31+34.

[2] 刘万辉.PHP 动态网站开发实例教程 [M]. 北京:高等教育出版社,2014.


作者简介:雷卫(1969.04-),男,汉族,辽宁大连人,本科, 高级讲师,研究方向:计算机及教学。