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 article mainly introduces some conditions that affect database performance. You can refer to this article.
Root Cause of impact on database performance:
1. Disk I/O read
2. CPU usage
3. Resource Competition
Optimization Method:
1. Design
I will share some date operations in mysql, that is, the addition or subtraction of mysql time and date that we often use. This mysql also has its own function, for more information, see.
The simplest method
The Code is as follows:
Copy
I have collected various query statements about MySQL Left Join and Right Join. For more information, see explain.
In the SQL standard, the planned Join is roughly divided into the following four types:
1. Inner join: the records that match the
I have introduced a lot about Database Import before. Today we want to talk about an instance which is a method for importing database files under DOS. If you need it, you can check it out.
Enter the bin directory of mysql
If you want to import SQL
During development, the myisam database needs to be converted to the innodb database. This method is often used because innodb supports many types that are not supported by myisam, such as stored procedures, here we provide a method. If you need it,
Let's take a look at the data export method and use the command line provided by mysql to import and export data, as shown below. Another way is to use php to import a. SQL file.
Assume that the mysql user name and password are root xxx and the
This article describes how to use the mysql root User remote logon command and various methods to start remote logon. For more information, see.
Use the root user on any host, password: youpassword (your root password) to connect to the mysql server:
This article introduces some differences and issues about using the is null function in mainstream databases. If you need it, you can give a simple reference.
Isnull is used in database queries, especially when the statement is connected.
For
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
Now, let's assume that top.html (the page above) has seven buttoners to refresh bottom.html (the page below). You can use the following seven statements to see which one is easy to use.
The code for the top.html page is as follows:
The mysql tutorial _ query () function executes a MySQL query.
SyntaxMysql_query (query, connection) parameter descriptionQuery is required. Specifies the SQL query to be sent. Note: The query string should not end with a semicolon.Connection is
Mysql tutorial loop and condition judgment SQL query statement writing, we all know that only mysql 5 appears after the stored procedure, these usage, then we need to use if else while in SQL, you have to use a stored procedure or function for
How to create, modify, and delete a table in SQLite (2)
I. Database tutorial Definition Language DDLIn relational databases, tables, views, Index indexes, relational Relationship, and Trigger triggers in databases constitute the Schema of databases.
Mysql tutorial cant open file: Table Name modification method
1. can't open file: '[table] mytable. myi'2. table 'picture' is marked as crashed and shoshould be retried red
The method described below is only valid for tables in myisam format. Other
Add, modify, and delete functions for fields in the mysql tutorial
Alter table tabelname add new_field_id int (5) unsigned default 0 not null auto_increment, add primary key (new_field_id );
// Add a new column
Alter table t2 add d timestamp;Alter
The following provides a connection code for the mysql tutorial database tutorial. Now we use the asp tutorial. net C # to connect to the mysql database and display data. The code is implemented as follows.
Simple Data Report
Today, when I wrote a data import, I came up with the mysql tutorial server has gone away. At first glance, I thought it was a database tutorial, but the other was normal. I found it from my website, the reason is that the SQL statement is too long
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