This section of the database connection class, he will automatically load SQL anti-injection function, filtering some sensitive SQL query keywords, but also can increase the Judgment Field Show table status of nature and Show table class to get all
knows.nl bied free access to Particulieren,bedrijven Chinese Verenigingen on the river.
Aanmelden voor Eyne website geheel kostenloos Dietegen to meet with the newspaper Registratie Formulier.
DirectAdmin controlpanel,php and MYSQL,100MB, 1 of the
Create and delete indexes
The creation of the primer can be done in the CREATE TABLE statement, or you can add indexes to the table separately with the CREATE INDEX or ALTER TABLE. The deletion index can be implemented using ALTER TABLE or DROP
MySQL writes data usually with INSERT statements, such asINSERT into Person VALUES (John, 20), (Dick, 21), (Harry,) ...;
Sometimes, however, you need to import data from text or export data to text in order to insert large amounts of data or
Recently encountered such a problem, in the MySQL stored procedure, the cursor operation, you need to perform a conitnue operation. As we all know, there are three kinds of cursor loops in MySQL, loop,repeat,while three loops, the same way. Never
MySQL under INSERT and update triggers can no longer use the update and insert operations, the official explanation is to prevent the death cycle, the solution is directly to new in the field assignment, but also very convenient, but also explains
To enable it, you need to set this in the MySQL configuration options file (MY.CNF):
The code is as follows
Copy Code
[Mysqld]Log-slow-queries
This defaults to logging more than 10 seconds of queries to the log
The usual way to set up a self-add field:
Add when creating a table:
CREATE TABLE table1 (ID int auto_increment PRIMARY key,...)
Add after creating a table:
ALTER TABLE table1 Add ID int auto_increment primary key self-add field, be sure to set
Method One,
The code is as follows
Copy Code
SELECT table_rows from Information_schema.tables WHERE table_name= ' game ' and Table_schema = DATABASE ();
Usage in PHP
PHP code example
The code is
Length: is a calculation of the lengths of a field a Chinese character is counted three characters, a number or letter is counted as a character
The Char_length (str) return value is the length of the string str, and the length of the unit is a
Regexp
Example 1. The query field contains data that is not in English
The code is as follows
Copy Code
SELECT *From ' M_user 'WHERE ' Emp_no 'REGEXP ' [^-~] ' =1
Column 2. So I can get all the English-free
Master's is the mark? MySQL, Slave replaced Percona, did not expect to keep up with progress, and Slave and Master gap more and more distant.
Document and description of InnoDB efficiency adjustment and correction Found by file has a parameter
A simple way to remove duplicate values from MySQL
Example:
TableID Name1 A2 b3 C4 C5 b
The library structure is probably like this, this is just a simple example, the actual situation will be much more complicated.
For example, I want to use a
1.MySQL export Local database data to local file
SQL code
The code is as follows
Copy Code
Load data infile '/tmp/test.csv 'into table Test_infoFields terminated by ', ' optionally enclosed by ' "' escaped by '" 'Lines
In fact, the MySQL automatic backup of the small script is very simple, the following is the steps of this small script.
The code is as follows
Copy Code
#cd/www#mkdir Mysqlbackup#vi mysqlautobackup.sh
This
1.linux under the command to start MySQL:
The code is as follows
Copy Code
Mysqladmin start/ect/init.d/mysql Start (Previous installation path for MySQL)
2.linux Restart MySQL command:
The code is
How to view all authorized usersSELECT DISTINCT CONCAT (' User: ', user, ' @ ', host, '; ') as query from Mysql.user;Revoke permissions that have been given to the MySQL user.Revoke is similar to Grant's syntax, just replace the keyword "to" with
An introduction to the optimistic and pessimistic locks in MySQL and how to use them simply.
The probability of being asked about the optimistic lock and pessimistic lock interview in MySQL is still relatively large.The pessimistic lock of MySQL:
MySQL database 1067 error code solution, mysql1067
MySQL 5.6 is installed in Windows Professional 7 64-bit, but an error occurs one day with the error code 1067. How can this problem be solved?
Follow these steps:
1. log in as a system
Mysql uses one table to update another table. mysql updates another table.
Solution 1: Modify 1 column
Update student s, city cSet s. city_name = c. nameWhere s. city_code = c. code;
Solution 2: Modify multiple columns
Update a, B
Set a. title =
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service