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...