Home > Download >  Library download > Database operation class

  • IntroductionA good PHP mysql operation class,Data saving variables after SQL execution, Read a piece of data and move the data back one bit. If the data is empty, it will return null. Update the data in the database. $t is the table name, $v format is array format, and the superscript is Field name, the subscript is data; $w is the condition, the superscript is the field name, the subscript is data, $p is the condition, 0 is the equal sign, 1 is greater than, -1 is less than .

    Database operation class15522017-03-22
  • A PHP database writing operation class, with three categories 1. Filter input. The lightweight class input_filter is responsible for filtering parameters such as $_GET and $_POST. The return value type is an array and is used as a parameter of the made_sql class. 2. Convert to SQL statement class made_sql. The parameter type is array and table name (string). The key name of the array is the column name of the table, and the value is the inserted value. The return value type is string and is used as mysql -> Parameters of query method. 3. The database query class mysql uses single column mode and uses static methods to obtain objects. For details, please refer to the role of the instanceof operator.

    Database operation class19932017-03-21
  • 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.

    Database operation class16472017-03-21
  • The dbconfig class is responsible for configuring database access information, including: server address, port, database instance name, user name, user password, character set, etc. The dbtemplate class collects access operations to the database, mainly including the following operations: 1. queryrows: returns multiple rows of records 2. queryrow: returns a single record 3. queryforint: Query a single field and return an integer 4. queryforfloat: Query a single field and return a floating point number (float) 5. queryfordouble: Query a single field and return a floating point number (double) 6. queryforobject: Query a single field and return the object. The actual type is determined by the database. 7. update: execute an update statement. insert / upadate / delete

    Database operation class18002017-03-21
  • Aphp-mysql complete database connection class,test phase, displays all errors, has security risks, is closed by default, Whether to terminate immediately when an error is detected, the default is true, it is recommended not to enable it, because it is very distressing for users to not see anything when there is a problem,Database execution statement , any sql statement # can be executed to query, add, modify, delete, etc.

    Database operation class12982017-03-21
  • A PHP and MySQL database connection file code. If you are looking for code with such functions, you can come in and take a look. It is a very complete file for everyone to learn and refer to.. Display how many tables there are, how many databases there are, Delete database: return deletion results .

    Database operation class17172017-03-21
  • This article is a comparative example of a connection class for PHP to connect to a mysql database. Compared with the general PHP mysql database function, it is much more practical and easy to operate and maintain. As long as you deal with this one, you will be KO. ,Automatically connect to the database when instantiated,Connect to the mysql server, connect to the database, set the character encoding,Execute the passed sql statement , and return the result $result resource identifier

    Database operation class17202017-03-21
  • Introducing a musql PHP connection class, which is stripped from a cms system and retains its complete functional modules. If friends need it, they can directly call this class and download it directly for reference Use it. If your friends have better functional modules of this type, you can upload them and share them with us so that everyone can learn and communicate together.

    Database operation class16312017-03-21
  • Mainly introduces PHP simple database operation class examples, supporting addition, deletion, modification, query and chain operations, which is very suitable for the development and use of small projects. When developing a project, a database is an indispensable thing. But many times, I feel a headache due to the complexity of database SQL statements. Provide a database operation class (Model) for everyone to use. It supports addition, deletion, modification, and query, and supports chain operations. The code is less than 100 lines. It is very compact and convenient, and is very suitable for rapid deployment of small projects.

    Database operation class13712017-03-21
  • Introduces the sharing of MongoDB database operation classes implemented in PHP, the template mysql version of the operation class, supports passing in multiple mongo_servers (1. Connect to other servers when one has a problem 2. Automatically Evenly distribute queries to different servers), Create index: If the index already exists, return.

    Database operation class22162017-03-21
  • Mainly introduces the sqlite database connection class implemented by PHP, which involves sql operations such as connection to SQLite database and addition, deletion, modification and query. It is of great practical value and friends in need can refer to it. Database connection, return the database connection identifier, Execute the sql statement, Get a row from the result set as an associative array.

    Database operation class20242017-03-21
  • A very complete PHP connection to the MySQL database, using PHP to connect with the MySQL database. Well, without further ado, let’s see if this classic database connection code is what you are looking for. It is required. Friends can download it for reference and modification.

    Database operation class17232017-03-21