search
HomePHP LibrariesDatabase operation classpdo database operation class
pdo database operation class
  1. Parameter Description
  2. int $debug Whether to enable debugging, if enabled, the sql statement will be output
  3. int $mode 0 Return array
  4. 1 Return a single record
  5. 2 Return the number of rows
  6. string $table database table
  7. string $fields The database fields that need to be queried. It is allowed to be empty. The default is to find all
  8. string $sqlwhere Query conditions, empty is allowed
  9. 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.



Disclaimer

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

PDO database operation classPDO database operation class

25Jul2016

PDO database operation class

PHP PDO database operation classPHP PDO database operation class

25Jul2016

PHP PDO database operation class

PHP PDO database class update operationPHP PDO database class update operation

25Jul2016

PHP PDO database class update operation

PHP PDO database class delete operationPHP PDO database class delete operation

25Jul2016

PHP PDO database class delete operation

Encapsulate a PDO database operation class code_PHP tutorialEncapsulate a PDO database operation class code_PHP tutorial

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

Insert operation of PHP PDO database classInsert operation of PHP PDO database class

25Jul2016

Insert operation of PHP PDO database class

See all articles