CopyCodeThe Code is as follows: $ Uname = $ _ post ["username"];
$ Pwd = $ _ post ["password"];
$ Link = mysql_connect ('localhost', 'root', '123 ')
Or die ('could not connect: '. mysql_error ());
Mysql_select_db ('ruida ') or die ('could not
Mysql_query ("begin"); // starts a transaction.
Mysql_query ("set autocommit = 0"); // you can specify that the transaction is not automatically committed.
$ Insert = "insert into userinfo values ('aa12', 'A', '1', 'aaa ')";
Mysql_query ($ insert
SQL
CopyCodeThe Code is as follows: insert into 'table' ('id', 'AA', 'bb ', 'cc') Select 'id', 'AA', 'bb ', 'cc' from 'table' (where .....)
TIPS:Copy codeThe Code is as follows :/*** When copying a new record, you may need to update the ID or part
I. Problems
To generate two types of data:
Class A: 01 02 03 of two digits... 09 10 11... 19 20 21... 98 99
Another Class B: The third-digit 100 101 102... 110 111 112... 998 999
Ii. Solution
1. Create a table
CopyCode The Code is as follows:
The time format is 2008-06-16.
Query the data of the current day:
Select * From 'table' where date (time field) = curdate ();
Query the current month field:
Select *
From 'table'
Where month (time field) = month (now ());
The time format is 12
1. digit type. The number types are classified into three types by my classification: integer, decimal, and number.
My so-called "number classes" refer to decimal and numeric. They are of the same type. Strictly speaking, it is not a numeric type,
I. Dual-host mutual backup and automatic switching solution:
1. Topology:
2. Explanation:
(1) assume that the Internet domain name blog.s135.com is resolved to the Internet virtual IP address 72.249.146.214, and the Intranet hosts sets db10 to the
For example, if the existing string "[] aseabcd [12345] ddxabcdsx []" is to be intercepted, the content between "ABCD [" and "first"] "after" ABCD ["" 12345 ", of course, the content length is not fixed, it can be "123456" or other strings.When he
Premise: You will use VI. Obviously, this article is tested in Linux. This document uses the MySQL command line tool. If you do not, you can use phpMyAdmin.
Step 2: Download the pure real IP data and decompress it into ip.txt.
Explanation: you do
1. Release in apache2.2 \ conf \ httpd. conf:
Include CONF/extra/httpd-vhosts.conf (remove the previous #)
2. Added in httpd. conf.
# DWM directory of the project folder. do not define directories and folders in Chinese.
#
# Possible values for the
Software Version:
Apache: apache_2.2.14-win32-x86-no_ssl.msi
1. apache2.2
Select Custom and configure the installation directory. By default, the installation directory is down. You can test it first,
Enter 127.0.0.1 as the browser IP address.
Solution:
1. Change the table.
It may be that your account is not allowed to log on remotely, but only on localhost. At this time, you only need to log in to MySQL on the computer of localhost, and change the "host" entry in the "user" table in
1. If the connection between the client and the server needs to span and pass through an untrusted network, you need to use an SSH tunnel to encrypt the communication between the client and the server.
2. Use the SET Password statement to modify
Risk 1: If the cookie on the client machine fails due to a virus, the session will be lost.
Hazard 2: sessions are stored in a temporary folder in PHP by default in the form of files. For a small system, this can be done completely,
However, it is
Show tables or show tables from database_name; // display the names of all tables in the current database
Show databases; // display the names of all databases in MySQL
Show columns from table_name from database_name; or show columns from
Several criteria for creating an index:
1. Reasonable indexing can accelerate data reading efficiency. improper indexing slows down the response speed of the database.
2. The more indexes, the slower the data update speed.
3. Try to use indexes when
Relatively speaking, it is straightforward to load data into the database. However, there are also policies to improve the efficiency of data loading operations. The basic principles are as follows:
Batch loading is faster than single-row loading,
Mysql 5.1 supports triggers and UDF features. If libmemcache and Memcached Functions for MySQL are used together, memcache can be automatically updated. Record the installation and testing steps.
Installation Steps
Install memcached. This step 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