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
Environment variable settings: Right-click my computer on the desktop and choose Properties> advanced> environment variables> double-click the path to add the C: \ mysql5.1.40 \ bin directory. If you want to use SDK development, add the lib and
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
These problems may change the data value. In general, the above problem may occur when you use non-binary string data types (such as char, varchar, text, and other data types.
Aes_encrypt () and aes_decrypt ()
Aes_encrypt () and
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.
1.1 Environment Construction
Prepare two windows NT hosts, install the Ikey server Windows version, and confirm that the version is correct. Ensure that the MySQL service starts properly and that the two hosts are in the same LAN, determine which
1. Create a database and a Registry
CopyCode The Code is as follows: Create Database db_register;
Create Table db_register.tb_register (
Reg_loginid varchar (20) primary key,
Reg_name varchar (20) not null,
Reg_id int not null,
Reg_password
For operations on the string position, the first position is marked as 1.
ASCII (STR)
Returns a string.StrASCII of the leftmost characterCodeValue.If
StrIs a null string and returns
0. If
StrYes
Null,
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
Myisam_max _ [Extra] _ sort_file_size is large enough
Delay_key_write reduces Io and improves Write Performance
Bulk_insert_buffer_size
Set concurrent_insert to 2.
Read_rnd_buffer_size random Scan
Read_buffer_size sequential table Scan
Three
1. Create a database:
Go to the phpMyAdmin Management page, find the text "Create a new database", enter the name of the database to be created below, and select the database encoding from the drop-down list, for example, "utf8_general_ci", click
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
Fortunately, MySQL provides some methods for batch data entry, making it easy to add data to a table. This section and the next section describe these methods. This section describes the SQL language-level solutions.
1. Basic syntax
Syntax:
In MySQL, The auto_increment type Id field is used as the primary key of the table and as the foreign key of other tables to form a "master-slave table structure". This is a common usage in database design. However, when an ID is generated, the
Value.
For example.
Method 1:
CopyCodeThe Code is as follows: $ SQL = "select * Form ABC"
$ Result = mysql_query ($ SQL );
$ ROW = mysql_fetch_array ($ result );
If (empty ($ row) // start to judge whether it is null
{
Echo "null ";
}
1. Create a data table --- BASICS (skipped by experts)
Orthodox method: create [TEMPORARY] table name [if not exists]
(Column item definition created)
[Table options]
[Partition options]; # The Orthodox creation method. For specific parameters,
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
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