code is as follows
copy code
Require_once './includes/reader.php ';Excelfile ($filename, $encoding);$data = new Spreadsheet_excel_reader ();Set output encoding.$data->setoutputencoding (' GBK ');"Data.xls" refers to the Excel
This procedure includes three files
reg.html User Registers HTML pagereg.php PHP Processing codeconn.php Database Tutorial Connection file
reg.html Code
The code is as follows
Copy Code
php+ajax User Registration To
Do a QQ chat dating site, want to add a chat function, so finished using PHP to do a simple and powerful chat room
1. Creating a MySQL database table: CREATE TABLE Chat (id bigint auto_increment,username varchar (), chatdate datetime,msg, varchar ()
Free dual-line space (top600 type)Price: 0 yuan/Year 0 yuan/2 yearsContent: 100M dual-line web page space. Line for telecom + Netcom = North-South InteroperabilityThis class of machine a server only put 20 users, greatly improve performance.Send
110MB Space-free (can be upgraded to up to 15GB)10GB of bandwidth-free! (Can be upgraded to 1TB)Dual Xeon and Hao long serverSmall Industry-free!PHP 5-Free!Rent 5-* Must be activatedFTP (Property support)-* Must be activatedIoncube and Zend
Download the MySQL installation file
The following two files are required to install MySQL:
mysql-server-4.0.16-0.i386.rpmmysql-client-4.0.16-0.i386.rpm
Download Address: http://www.mysql.com/downloads/mysql-4.0.html, open this page, Drop-down
1. First, verify that the server is in a secure state, that is, no one can arbitrarily connect to the MySQL database.Because the MySQL database is completely out of password protected during the reset of the MySQL root passwordState, other users can
Normal query (SELECT statement used to select data from the database)
The SELECT from syntax is used to query read data from a datasheet.
Grammar:
The code is as follows
Copy Code
SELECT Column1,column1,... From
Length: is a calculation of the lengths of a field a Chinese character is counted three characters, a number or letter is counted as a character
The Char_length (str) return value is the length of the string str, and the length of the unit is a
Regexp
Example 1. The query field contains data that is not in English
The code is as follows
Copy Code
SELECT *From ' M_user 'WHERE ' Emp_no 'REGEXP ' [^-~] ' =1
Column 2. So I can get all the English-free
The error prompts are as follows
error:2049 (Cr_secure_auth)
Message:connection using old (pre-4.1.1) authentication protocol refused (client option ' Secure_auth ' enabled)
Error: 2049 (Cr_secure_auth)Message: Connection request denied using old
Summary of several common MySQL backup methods:
Direct copy of database files
First, the data in memory is flushed to disk, while the data table is locked to ensure that no new data is written in the copy process:
The code is as
The MySQL Replication encountered the following error message: (mysql> show slave status\g # simplified message below)
last_errno:1580Last_error:error ' You cannot ' ALTER ' a log table if logging are enabled ' on query. Default database: ' MySQL '.
1, through floor error
You can use the following code
The code is as follows
Copy Code
and select 1 from (SELECT COUNT (*), concat (version (), Floor (rand (0) *2)) x to Information_schema.tables Group by X);and (select
MySQL has five common log types: error log, binary log, query log, slow check log, and relay log.
One, error log
The error log contains four types of information:(1) Information during the process of server startup and shutdown;(2) Error message
Recently also constantly improve the Wblog program, so far, Wblog has not installed the program, the two days are busy writing, to install the program has come to an end, can basically install, but is not yet detect PHP version and MySQL version of
The easiest way to export table data to a text file is to use the Select ... The query results into the OUTFILE statement are exported directly to a file on the server host.
Select for export Data ... into outfile declaration:
The syntax of this
Linux version: Ubuntu 12.04The PHP MySQL and Apache configuration was completed todayis mainly the source code configuration,Apache is mainly version 2.4.2PHP is mainly 5.3.11 versionMySQL is mainly 5.1.62 version
Several days ago tried several
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