Creating a Database
The code is as follows
Copy Code
CREATE TABLE IF not EXISTS ' tet ' (' id ' int (one) not NULL,' Name ' varchar (255) Not NULL,' URL ' varchar (255) Not NULL) Engine=innodb DEFAULT Charset=utf8;The
PHP's MySQL WHERE clause
The WHERE clause is used to filter records.WHERE clauseThe WHERE clause is used to extract only those records that complete the specified criteria.Grammar
SELECT column_name (s) from
table_name
WHERE column_name
LNMP One-click installation of the install package MySQL default is to open the log file,
If the data operation is more frequent, it will produce a lot of logs.
A mysql-bin.0000* similar file is generated below the/usr/local/mysql/var/,
And
Read about the MySQL error injection of technical articles, are similar to the following statements are injected. Such a statement is called the formula "formula", a lot of small dishes are used directly, do not know why this is. But I have to have
Use Overlay Index
A table is built on the id,create_time to establish an index.
The following 2 SQL statements are executed at the same time. Because the query field ID is overwritten by the index.
Select ID from order_manage where create_time > '
A query of numeric data:select*fromtb_namewheresum>100;Query predicate: >,=,,!=,!>,!=, Two query stringsSelect*fromtb_stuwheresname= ' Xiao Liu 'Select*fromtb_stuwheresnamelike ' Liu% 'Select*fromtb_stuwheresnamelike '% Programmer
Solutions under Windows: My.ini inside the mysqld partJoin lower_case_table_names=2 [Mysqld]lower_case_table_names=2Set-variable=lower_case_table_names=0Port= 3306 Note: 1 indicates that case-insensitive 2 indicates case sensitivity Then reboot the
1. Query cache key is a SQL string, and requires exact matching: The case is not the same or more than one space, will result in cache miss
2. Query cache directly the user input of the original SQL as a key, not to parse or optimized after the SQL
For the locate function in MySQL, you can view the link: http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_locate For the Replace function in MySQL, you can view the link:
PS: This profile is for Dell R710, dual Xeon E5620, 16G memory hardware configuration. CentOS 5.6 64-bit system, MySQL 5.5.x stable version. Applies to the day IP 50-100W,PV 100-300w site, mainly uses the InnoDB storage engine. For other application
Recently a few students asked me varchar and text have what do not, this problem, previously said really did not much collation, before the text in the design is as far as possible to the other table, to keep the main table as small as possible, so
mysqldump Command mode
Backup IP to 192.168.1.100 a library:
The code is as follows
Copy Code
D:/apm/apmserv5.2.6/mysql5.1/bin>Mysqldump-h 192.168.1.100-u root-p Ucenter >d:/sql/uc_20130306.sqlEnter Password: * * *
Internet offers 100M free asp+php space applicationIndependent web space 100MB;Share 100M bandwidth, unlimited number of concurrent connections, unlimited flow;Support asp,php scripting language and mysql,access database;Support Dynamic Yin Yun and
200M Free space Support asp/phpAddress: Www.ShengHua.BizDomain Name Online binding √Set Default Document √Set Space Status √FTP Online Web upload √FTP client software upload √
300M High speed PHP free space
Hostse free space to use layered panel
Click Virtualmin =>create Virtual Server => and then set the domain name and password
Most of the cases: just fill in the domain name (can be a level two domain name, such as abx.bxl.me, the top-level domain name does not need to write www.) and
We will use the SimpleXMLElement function to operate xml files in php. Let's take a look at the usage of SimpleXMLElement.The SimpleXML function allows you to convert XML into objects.This object can be processed by using a common attribute selector
Update the null field value to 'none'The first thought is:Update 'client' set 'Company' = 'none' WHERE 'Company' = NULLResult errorThe correct method IS to use the is null condition.Update 'client' set 'Company' = 'none' WHERE 'Company' IS
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