PHPPEARDB function summary _ PHP Tutorial

Source: Internet
Author: User
A summary of PHPPEARDB functions. PHPPEARDB function description: connect (): Database link function query (): SQL statement execution function execute (): SQL statement execution function, which is slightly different from query () function usage. SetF

Descriptions of php pear db functions:

Connect (): database connection function

Query (): SQL statement execution function

Execute (): SQL statement execution function, which is slightly different from query () function usage.

SetFetchMode (): Sets whether the returned record set is a digital index array or an associated array or object.

NumRows (): returns the number of rows in the record set.

NumCols (): returns the number of columns in the record set.

Free (): release record set

Disconnect (): Closes the database link

AffectedRows (): number of records affected by the operation

IsManip (): determines whether a query is a data processing or data definition operation.

Platform migration instructions:

Ideally, when porting data to other types of database platforms, you only need to modify the DSN string parameter in the php pear db function. However, for queries specific to some specific databases, you can only modify the port to another database platform.

Others:

All related databases supported by php pear db functions are stored in the DB Directory. if you are interested, check them out.

Through the code example above, we can use the php pear db class to implement access to different databases.


Http://www.bkjia.com/PHPjc/446031.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/446031.htmlTechArticlePHP pear db function description: connect (): Database link function query (): SQL statement execution function execute (): SQL statement execution function, and query () function usage is slightly different. SetF...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.