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
The code is as follows
Copy Code
Class cls_mysql{var $querynum = 0;var $link;var $histories; var $dbhost;var $dbuser;var $dbpw;var $dbcharset;var $pconnect;var $tablepre;var $time; var $goneaway = 5; Function Connect ($dbhost,
Database connectivity is a limited and expensive resource, and database connections affect the performance metrics of the program. The database connection pool is proposed for this problem. The database connection pool is responsible for allocating,
///Access library convert to MySQL database tutorial The friend who does not understand can add qq:345838256///////////////////////////////////I collect data is access, But my program is MySQL, so write a program, the program three steps to share ...
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
Use the MySQL command to connect to the MySQL server, execute "select version () command to confirm the MySQL release.
Username and password Specify the username and password that can be used to connect to the MySQL database.
# mysql-uusername-p '
PDO MySQL Introduction
The PHP Data Objects (PDO) extension defines a lightweight, consistent interface for PHP access to the database. Each database driver that implements the PDO interface can expose specific database features as standard
MySQL Workbench Not available
Previously used in the XAMPP MySQL components, the previous use of relatively simple, but only to import the database in the WEB directly after the use, did not find this component of the problem, today with MySQL
Generally we use mysqldump to back up the MySQL database and upload it to other backup machines. If the database is large, it may be slow when the backup is transmitted, so we try to make the backup file smaller.When writing an automatic backup
Sub-table
1, do MySQL cluster, for example: Use MySQL cluster, MySQL proxy,mysql Replication,drdb and so onSome people will ask MySQL cluster, what is the relationship between the root table? Although it is not in the actual sense of the table, but
My most common method is
The code is as follows
Copy Code
Delete ID duplicate data, suitable for ID is manual primary keyDelete Person as a from as a,(Select *,min (ID) from person GROUP by ID having count (1) > 1) as
A bunch of methods were found on the internet as follows:
1. May be the/usr/local/mysql/data/rekfan.pid file does not write permissionWorkaround: Give permission, execute "chown-r mysql:mysql/var/data" "Chmod-r 755/usr/local/mysql/data" and restart
1. View MySQL database server and database character set
Show variables like '%char% ';
2. View the character set supported by the currently installed MySQL.
Show CharSet;
3, set the code:
Modify MY.CNFVi/etc/my.cnfAdd under
To add a user account to the MySQL users table:
Instead of adding a user record directly using the INSERT statement, you can use Insert to appear:
Error 1364 (HY000): Field ' ssl_cipher ' doesn ' t have a default value. However, the earlier MySQL
Long time no use of the database, it is inevitable that the password to forget the database, if the MySQL database password forgot how to do? Here are two simple ways to reset your password!
How to reset a password under Windows system
If you are
installing MySQL
The screenshot used is the MySQL 5.5 installation process, and 5.6 not much difference.
1. Confirm the installation of the Microsoft. NET Framework v4.0 Framework
The following illustration suggests:
If the. Net Framework
Htmlspecialchars
Converts special characters into HTML format.
Syntax: string Htmlspecialchars (String string);
return value: string
function Type: data processing
Content
I. Software preparation:Php (5.1.2): http://www.php.netMysql (5.0.19): http://www.mysql.comZend optimizer (2.6.2): http://www.zend.comPhpmyadmin (2.8.0.2): http://www.phpmyadmin.netSuppose c: The system disk for your current operating system. If
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