This article introduces how to call the stored procedure of mysql5 in php. Why do we only talk about mysql5? The reason is that only mysql5.0 and later versions support the stored procedure, next we will look at it from the beginning.
1. The method
This section describes automatic database backup and restoration methods after database destruction. Here, we use mysqlhotcopy and define a Shell script to implement automatic database backup. In addition, the entire process of automatic data backup
This article shares an article on mysql date formatting implementation. This article mainly introduces some references for date_format () functions and their usage in cmd mode, in fact, it is the same in cmd and php. If you need it, you can refer to
Today, a strange problem is analyzed. A program simulating the Slave thread is continuously killed by the Master Server. The final result is that two Slave instances use the same server id to connect to the Master Server, why do two Slave instances
This is just a reference, because mysql performance optimization involves many factors. The best optimization is based on the actual situation of your server and website. If you need it, please refer to it.
1. IntroductionIn the Web application
I will share an article about how to update data when saving data in mysql. Otherwise, I will save the data. It is very practical. If you need it, please refer to it.
// If no data exists, insert new data
The Code is as follows:
Copy
In MySQL 5.0.3 and later versions, the length of the varchar data type can reach 65535, that is, 65532 bytes of data can be stored, and the start and expires bits occupy 3 bytes. That is to say, in versions earlier than 5.0.3, data stored in fixed
Table Structure:Copy the Code as follows:---- Table structure 'category'--Create table if not exists 'category '('Id' int (11) not null AUTO_INCREMENT,'Type' int (11) not null comment '1 is Article type 2 is product type 3 is download type ','Title'
The explain syntax is as follows:
Explain [extended] select... From... Where...
If extended is used, you can use the show warnings statement to query the optimization information after the explain statement is executed.
For example, if we execute
C # Two Methods for connecting to the mysql tutorial database tutorial
Mysql provides a dll file named "mysql. data. dll ", I am currently using this dll file, put this file (see the attachment) under the bin directory of the website, you can use it.
The DATE_ADD () function adds a specified interval to a date.
SyntaxThe DATE_ADD (date, INTERVAL expr type) date parameter is a valid date expression. The expr parameter is the time interval you want to add.
The type parameter can be of the
Mysql tutorial database tutorial backup
When using mysql databases, database backup is the most common and important. So we will first introduce database backup. Database Backup is also a formal database backup method. It shares the same concept
Add new users and change passwords in the mysql tutorial
Format: mysqladmin-u username-p old password New password
1. Add a password ab12 to the root user. First, enter the directory mysqlbin in dos, and then type the following
Notes on Performance Optimization of php and mysql tutorials
The larger tmp_table_size = 200 m tmp_table_size, the smaller the probability of being converted to disk tmp table
Php program page mysql closed in time
Set mysql
Limit, 20 means to scan 10020 rows that meet the condition, discard the first 10000 rows, and return the last 20 rows. The problem is here. If it is limit 100000,100, You need to scan 100100 rows, in a highly concurrent application, more than rows
NULL values are not necessarily empty
A null value is a special field. In the mysql tutorial database tutorial, null values often have different meanings under different circumstances. This is a feature of the mysql database. For example, in a
Mysql tutorial 'reading initial communication packet 'error Solution
This problem occurs when the server is suddenly shut down,The error message is:
The database tutorial (mysql) server cannot be linked. Check the server address, user name, and
Mysql tutorial union syntax and example tutorial
This article describes how to use union in mysql to combine a single result.
Union syntax
Select field1, field2... union [all | distinct] select field1, field2...
The following describes a
SQL statement for querying and deleting duplicate records
(1)For exampleThere is a field "name" in Table ",The "name" value may be the same for different records,Now, you need to query repeated items in the "name" value between the records in the
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