Using a feature of the SELECT statement in MySQL makes it easy to implement the paging of query results, the syntax of the SELECT statement:
SELECT [Straight_join] [Sql_small_result] [Sql_big_result] [high_priority]
[DISTINCT | Distinctrow | ALL]
Today to introduce six more useful MySQL SQL statements, probably a lot of people through PHP to achieve these functions.
1. Calculation of years
You want to figure out how old this person is by birthdays.
SELECT Date_format (From_days to_days
MySQL is a multithreaded, Structured Query Language (SQL) database server. SQL is the most popular database language in the world. MySQL performs very well, runs very fast, and is very easy to use. is a very good database.
Download
MySQL's master-slave synchronization is a very mature architecture, the advantages are: ① can perform query work from the server (that is, we often say read function), reduce the pressure of the primary server; ② is backing up from the primary
mysql| problem MYSQL 4.1 after the adoption of a new user authentication protocol, for the old client will appear unsupported authentication protocol errors, the following is the official website solution;
1Upgrade all client programs to use a 4.1
1. Execute SQL statements in PHP
To get data from a database, first PHP executes a SQL statement that operates on a table, including a SELECT, INSERT, UPDATE, or DELETE statement. In general, executing a SELECT statement in PHP will find some
Contains crud, transactions, tree recursive queries, paging, and more. Demonstrate the simplicity of glamour. All parameters are escape, there is no injection problem.
/*
* Anthony.chen
* Reserved
*/
Class DB {
Query types
Const SELECT = 1;
In order to communicate with the MySQL server, you must have a good command of SQL. For example, when using a program such as a MySQL client, the function is first as a tool for sending SQL statements to the server. Also, if you write a program that
If you want to put binary data, such as picture files and HTML files, directly stored in your MySQL database, then this article is written for you! I'll show you how to store these files through an HTML form, and how to access and use them.This
mysql| Data | database | Optimization decided to begin to learn Oracle, with MySQL has not been a short time, write these today is a MySQL trip to their own account of it. The following is just my personal experience in the process of using MySQL,
mysql| optimize some of Mysql's optimization experience
1. Start from database structure 1. The definition of a field type follows the following rules: 1. Select the minimum field length of 2. Priority use of fixed-length type 3. As far as possible,
Received SMS alarm, two databases are reported slave synchronization failed, first explain the environment, architecture: Lvs+keepalived+amoeba+mysql, master copy, single write,
Main 1:192.168.0.223 (write)
Main 2:192.168.0.230
Okay, let's show
Directory
1.MySQL Hot-Backup script
2. Synchronize server with FTP
3.Keepalived Monitoring and switching scripts
4.SVN batch backup of the version library
5. Automatically monitor ADSL and dial number
6.Linux Batch Build Generation account
An environment
Httpd-2.2.17-win32-x86-no_ssl.msi
Mysql-5.5.9-winx64.msi
Php-5.3.5-win32-vc9-x86.zip
Phpmyadmin-3.3.9.1-all-languages.zip
Windows Server 2003 SP2 R2 Enterprise x64 Edition
Two installation
1) Install apache2.2 to d:/apache2.2
2
The creation of a master copy mentioned in the previous article assumes that the primary repository is a newly installed database. That means that the data on the two servers is the same, this is not a typical case, in most cases there is a master
The complete practice of MySQL backup and recovery
One, backing up the environment settings between databases
1, create the database test1, create the table TT Insert the following data
mysql> Create database test1;
Query OK, 1 row affected (0.0
Slow query log (does not include time to acquire locks)
1, open the Slow query log function
The parameters for opening the slow query log feature in previous versions are--log_slow_queries specified in the my.cnf file, but are now specified in the
If you have recently made a select or update query, you may have used one or more MySQL comparison operators to limit the query's output. Comparisons are an integral part of most select queries, and MySQL provides many functions for this function;
Q: How to solve MySQL 8 hours after the idle connection timeout problem?
A: When the application and the database connection, if more than 8 hours, the application sentence will not access the database, the database will be a broken connection
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