- Parameter Description
- int $debug Whether to enable debugging, if enabled, the sql statement will be output
- int $mode 0 Return array
- 1 Return a single record
- 2 Return the number of rows
- string $table database table
- string $fields The database fields that need to be queried. It is allowed to be empty. The default is to find all
- string $sqlwhere Query conditions, empty is allowed
- string $orderby Sorting, allowed to be empty, defaults to id reverse order
Another piece of code is based on the transaction instance of my database operation class. Note that the database operation table type must be InnoDB, and other types do not support transactions.
All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn
Related Article
21Jul2016
Encapsulate a PDO database operation class code. Copy the code The code is as follows: ?php /** * Database PDO operation */ class MysqlPdo { public static $PDOStatement = null; /** * Database connection parameter configuration * @var array * @access public
Hot Tools
Object-oriented php operation mssql class
Object-oriented php operation mssql class
Complete PHP operation MySQL database class
Complete PHP operation MySQL database class