摘要
PHP是开发动态网站使用较多的脚本语言,支持多种数据库系统,与流行的开源数据库MySQL能实现完美结合。PDO是PHP数据对象,主要用于PHP连接数据库,PDO是数据抽象层,可以让程序员更加简便地使用数据库,提高工作效率,是PHP处理数据库的发展趋势。本文主要阐述PHP使用PDO处理数据库的方法,包括对数据库表进行基本的记录添加、删除、修改和查询。读者通过本文给出的相应的可运行代码,可以快速建立自己代码库,提高开发效率。
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.
作者
雷卫
LEI Wei(Dalian Technician Institute,Dalian 116100,China)
出处
《现代信息科技》
2019年第3期20-21,共2页
Modern Information Technology