This article describes the implementation method of Php+mysql+ajax lightweight chat room. Share to everyone for your reference, specific as follows:Do a QQ chat dating site, want to add a chat function, so finished using PHP to do a simple and
1. Add a field
The code is as follows
Copy Code
Add a field, the default is emptyALTER TABLE user add COLUMN new1 VARCHAR DEFAULT NULL;Add a field, default cannot be emptyALTER TABLE user add COLUMN new2 VARCHAR is not
[on DUPLICATE KEY update in the arena]
If the table is not insert, if so, update will need to use the MySQL on DUPLICATE KEY update syntax, so you can write less if statements in the code to judge the
The on DUPLICATE KEY update is specified
MySQL Getting Started tutorial Chapter
MySQL database query
SELECT * FROM tableSELECT * FROM table1, table2, ...SELECT field1, Field2, ... From table1, table2, ...SELECT ... From ... WHERE conditionSELECT ... From ... WHERE Condition GROUPBY
The article examples of MySQL's 1067 errors in a variety of solutions, so that people encounter this error can quickly refer to the solution.
Content:
MySQL Error 1067: Process terminated unexpectedlyThis problem bothered me for a morning, very
1. New query statement file Query.sql, as follows:
The code is as follows
Copy Code
Use appdb;Set names UTF8;Select Feedid, city, message from Feed limit 1000;
The above set names UTF8 statement is the encoding
300M High speed PHP free space
The free php space size is: 1000M
The flow limit per month is: 25000M
Single file maximum limit: 8M
Support Ftp/web way to upload and manage files
Supports PHP5 and provides 3 MySQL databases free of charge
Can
The group by function should be used if each column specified in the select list must also appear in the GROUP by clause, unless the column is used to aggregate functions, but today I am going to help my colleagues debug a group by function in MySQL,
Each language will have some keywords or reserved words, MySQL is no exception, here are listed, easy to query:
MYQL keyword list, mark.
ADD all ALTER ANALYZE and as ASC asensitive before BETWEEN BIGINT BINARY
ADD
All
Alter
MySQL concurrency is strong, fast response, excellent performance of the database software; PHP is a powerful server-side scripting language. The author uses PHP4.0 MySQL3.23.38 to establish a variety of applications in Shanxi Aluminum plant website
The safest state is to operate on the console of the server and unplug the network cable.
1. To modify MySQL login settings:
# VI/ETC/MY.CNF
In the paragraph of [mysqld], add a sentence: Skip-grant-tablesFor example:
SQL Server randomly reads several records from a table:Example: The code is as follows:Copy code Select top 10 id, title from news order by newid () After optimizationIn MSSQL, the following method is used to randomly read more than data
Add the following content to the apache configuration file or the virtual host configuration file (that is, the configuration of LogFormat and CustomLog:LogFormat "insert into apachelog (ID, dateTime, IP, URL, code, referer, userAgent, size, request)
1. Semicolon exceptionsFor MySQL, the first thing you must remember is that every line of its command is ended with a semicolon (;), ...... There is no such thing as absolute. The same is true here. When a MySQL line is inserted in the PHP code, it
MySQL 3.23.40 is released again.Fixed -- low-priority-updates and INSERT.Fixed the problem that the master process was 22 bytes ahead of the master process in some special circumstances.Added slave_wait_timeout for replication.Corrected the issue of
When you connect to a MySQL server, you should usually use a password. The password is not transmitted in plain text on the connection.All other information is transmitted as text that can be read by anyone. If you are worried about this, you can
For demonstration, we first create two tables with bad indexes and get some data.Mysql> show create table test1 \ G* *************************** 1. row ***************************Table: test1Create Table: create table 'test1 '('Id' int (11) not null,
1. MySQL slow query log analysisPt-query-digest analyze slow query logsPt-query-digest-report slow. logReport slow queries in the last 30 hours:Pt-query-digest-report-since 1800 s slow. logReport slow queries within a period of
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