###############################################
This article is original, if there are references, please indicate the author information.
Author: Cold Love Madman
Email:edincur@yeah.net
Http://safebase.yeah.net
######################################
This article summarizes the common Chinese garbled problem in php+mysql storage data. Share to everyone for your reference, specific as follows:
Php+mysql The common reasons for Chinese garbled:
1. mysql database encoding is UTF8, and PHP page
Environment: WinXP SP2, mysql5.0.18,mysql ODBC 3.51 driver table uses MyISAM engine. Access 2003
Different places:
1, insert data, MySQL should try to use INSERT INTO statement, avoid using rs.addnew, if not to use, should first set Conn.
1. Enter MySQL in cmd view the default encoding format:
Mysql> Show variables like "%char%";
If it's not UTF8 (because I'm using UTF8), turn off the MySQL service and add it in My.ini.
Here I summarize the common methods to determine whether records exist:
SQL statement: SELECT COUNT (*) from TableName;
The value of the count (*) is then read to determine whether the record exists. For this method of performance some waste, we
After pinging and route, the network traffic is found to be normal, and the local connection on the MySQL machine is found to be very fast, so the network problem is basically excluded. I have encountered such a problem before, but then I do not
The most valuable asset of an enterprise is usually the customer or product information in its database. Therefore, an important part of database management in these enterprises is to protect this data from external attacks and to repair
Test table structure:
Copy Code code as follows:
--
--The structure of the table ' tet '
--
CREATE TABLE IF not EXISTS ' tet ' (
' id ' int (one) not NULL,
' Name ' varchar (255) Not NULL,
' URL ' varchar (255) Not NULL
What is the maximum length of varchar in the MySQL database? In fact, this is not a fixed number, the length of the varchar is limited rules . This article we will introduce the MySQL database varchar restrictions on the rules, and a practical
Copy Code code as follows:
$conn =mysql_connect (' 192.168.0.220 ', ' root ', ' 123 ');
if (! $conn) echo "Failed!";
else echo "Success!";
An SQL statement that extracts information from a table
$sql = "SELECT * from user where username=
Recently been told that the MySQL master and slave database data inconsistency, guess that the standby in the process of synchronization problems, so, board the library, using mysql> show slave status\g View, sure enough, the standby in the INSERT
Recently, I helped my colleagues rewrite a MySQL SQL statement, the SQL statement involves two tables, one of which is a dictionary (a field needs to be returned), the other table is a business table (there are 150 fields in itself, all are returned)
This paper illustrates the method of MyISAM table batch compression by MySQL. Share to everyone for your reference, specific as follows:
For the compression of the MyISAM table, you can use Myisampack and Myisamchk finishes (Myisampack must be
We usually use the password when we connect to the MySQL server. The password was added when it was transmitted over the network. But all the other content is transmitted in the form of clear text.
Of course, if you are concerned about this
echo "Connecting as mysql\n";
$connection 1 = mysql_connect (' localhost ', ' MySQL ', ') or Die ($php _errormsg);
echo "Connection1 is $connection 1\n";
echo "Selecting test for MySQL user\n";
mysql_select_db (' Test ', $connection 1) or @die
5. Layout module Design
The so-called classification, more is for Telnet server to consider, in cq66 mode, users can press
According to their own wishes to classify, anyway, the final is directly to version as the basic unit of access.
For the
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