What are the functions of PHP PEAR DB class
This article mainly introduces what the PHP PEAR DB class functions are, which are introduced in great detail and have certain reference value. Friends who are interested must finish reading them.
Description of PHP PEAR DB class function:
Connect (): database link function
Query (): SQL statement executes function
Execute (): the SQL statement executes the function, which is slightly different from the query () function.
SetFetchMode (): sets whether the returned recordset is a numerically indexed array or an associative array or object
NumRows (): returns the number of rows in the recordset
NumCols (): returns how many columns are in the recordset
Free (): release the recordset
Disconnect (): close the database link
AffectedRows (): number of rows of records affected by the operation
IsManip (): determines whether a query is a data processing or a data definition operation
Platform migration instructions:
Ideally, when porting to other types of database platforms, you only need to modify the DSN string parameters in the PHP PEAR DB class functions, but for some specific database-specific queries, you can only modify them when you migrate to other database platforms.
Other:
The DB directory stores all the relevant databases supported by PHP PEAR DB class functions, which can be seen by interested friends.
Through the above code example, we can use the PHP PEAR DB class to achieve different database access functions.
These are all the contents of the article "what are the PHP PEAR DB functions?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!