The following is a description of the main content of the article.
The code is as follows
Copy Code
Found_rows (): SelectRow_count (): UPDATE Delete Insert
Note: You need to work with the appropriate operation,
Principle Steps
1,php use mysql_connect to connect with MySQL database
2, open MySQL database
3, accept the page data, PHP input to the specified table
4, and then use Mysql_query to execute and save the SQL to the database.
Connection MySQL
The code is as follows
Copy Code
$conn = mysql_connect (' localhost ', ' root ', ' password ');Var_dump ($conn);?>
The basic is to change the configuration file php.ini
First, make sure that the Extension_dir = "./ext" in
1. Create a database connection2. Send some statements that are not necessary3. Select a stored database4. Write the database INSERT statement5. Send this statementLook at the data structure first
The code is as follows
Copy Code
This article introduces Python operation MySQL, execute SQL statement, get result set, traverse result set, get a field, get the name of the table field, insert the picture into the database, execute the transaction and so on various code examples
Backup MySQL with mysqldump
1. Establish the file path to back up
# Mkdir/opt/bak/mysql/cxyI am the library for the path, MySQL under the storage of multiple libraries, cxy for the library2. Create Backup script files# vi/usr/sbin/mysqlbak.shInput
The same website program runs under Linux more quickly than in Windows, so decided to use Linux distribution CentOS, this article mainly explained under CentOS use Yum command to install the lamp detailed process. The software we use is the latest
1. Install apache,mysql,php with Yum1.1 Installing Apache
The code is as follows
Copy Code
#yum Install httpd Httpd-devel
When Setup is complete, start Apache with/etc/init.d/httpd startSet to boot:
Using on DUPLICATE KEY update
Look at two SQL first
The code is as follows
Copy Code
INSERT into Osc_visit_stats (stat_date,type,id,view_count) VALUES (?,?,?,?) On DUPLICATE KEY UPDATE view_count=view_count+?
MySQL provides a solution for this problem based on the built-in Full-text lookup. Here, developers simply mark out fields that require Full-text lookup, and then run the search in those fields using a special MySQL method, which not only improves
Verification of the user name and password process, we usually do a system, many times will involve the authentication. Today we'll see how MySQL is coming in.
Row validation. (Note is login, not login ^_^)
First, the principle of
If you have forgotten the root password locally, try the following methods:
Open cmd first stop MySQL service
net stop MySQL
Enter the Bin folder in the MySQL installation directory and enter
Mysqld-nt--skip-grant-tables
Skip Password detection
LTrim function
The code is as follows
Copy Code
Mysql> Select Concat ('. ', LTrim (' ddd '), '. ');
RTrim function
The code is as follows
Copy Code
Mysql> Select Concat ('. ', RTrim
All along, for the query_cache of MySQL, on the internet is popular with this saying, "For MySQL Query_cache key value is the MySQL query, so if there are any differences in query, including more than a space, Will cause MySQL to think it is a
The Linux environment in this article is Red Hat 9.0,mysql is 4.0.16.Second, the installation of MySQL1, download the MySQL installation filesThe following two files are required to install MySQL:mysql-server-4.0.16-0.i386.rpmmysql-client-4.0.16-0.i3
No matter ASP or PHP programming languages, or even other WEB languages, basic applications are nothing more than Database addition, reading, editing, and deletion requirements, complex functional projects are all centered around this. Chinese data
Error message#1045-Access denied for user 'root' @ 'localhost' (using password: YES)Find the config. inc. Php file in the phpmyadmin directory and modify the following location:For the config. inc. Php file, the most important thing is to modify the
1. Update the installation environmentBefore installing this Web application, we need to update the latest system software package and run the following command line. The code is as follows:Copy code Sudo apt-get updateSudo apt-get upgrade 2.
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