MySQL Information Functions
Table 12.18 Information Functions
| Name | Description |
|---|---|
BENCHMARK() |
Repeatedly execute an expression |
CHARSET() |
Return the character set of the argument |
COERCIBILITY() |
Return the collation coercibility value of the string argument |
COLLATION() |
Return the collation of the string argument |
CONNECTION_ID() |
Return the connection ID (thread ID) for the connection |
CURRENT_USER(), CURRENT_USER |
The authenticated user name and host name |
DATABASE() |
Return the default (current) database name |
FOUND_ROWS() |
For a SELECT with a LIMIT clause, the number of rows that would be returned were there no LIMIT clause |
LAST_INSERT_ID() |
Value of the AUTOINCREMENT column for the last INSERT |
ROW_COUNT() |
The number of rows updated |
SCHEMA() |
Synonym for DATABASE() |
SESSION_USER() |
Synonym for USER() |
SYSTEM_USER() |
Synonym for USER() |
USER() |
The user name and host name provided by the client |
VERSION() |
Return a string that indicates the MySQL server version |
-
The
BENCHMARK()function executes the expressionexprrepeatedlycounttimes. It may be used to time how quickly MySQL processes the expression. The result value is always0. The intended use is from within the mysql client, which reports query execution times:mysql>
SELECT BENCHMARK(1000000,ENCODE('hello','goodbye'));
+----------------------------------------------+
| BENCHMARK(1000000,ENCODE('hello','goodbye')) |
+----------------------------------------------+
| 0 |
+----------------------------------------------+
1 row in set (4.74 sec)The time reported is elapsed time on the client end, not CPU time on the server end. It is advisable to execute
BENCHMARK()several times, and to interpret the result with regard to how heavily loaded the server machine is.BENCHMARK()is intended for measuring the runtime performance of scalar expressions, which has some significant implications for the way that you use it and interpret the results:Only scalar expressions can be used. Although the expression can be a subquery, it must return a single column and at most a single row. For example,
BENCHMARK(10, (SELECT * FROM t))will fail if the tablethas more than one column or more than one row.Executing a
SELECTstatementexprNtimes differs from executingSELECT BENCHMARK(in terms of the amount of overhead involved. The two have very different execution profiles and you should not expect them to take the same amount of time. The former involves the parser, optimizer, table locking, and runtime evaluationN,expr)Ntimes each. The latter involves only runtime evaluationNtimes, and all the other components just once. Memory structures already allocated are reused, and runtime optimizations such as local caching of results already evaluated for aggregate functions can alter the results. Use ofBENCHMARK()thus measures performance of the runtime component by giving more weight to that component and removing the “noise” introduced by the network, parser, optimizer, and so forth.
-
Returns the character set of the string argument.
mysql>
SELECT CHARSET('abc');
-> 'latin1'
mysql>SELECT CHARSET(CONVERT('abc' USING utf8));
-> 'utf8'
mysql>SELECT CHARSET(USER());
-> 'utf8' -
Returns the collation coercibility value of the string argument.
mysql>
SELECT COERCIBILITY('abc' COLLATE latin1_swedish_ci);
-> 0
mysql>SELECT COERCIBILITY(USER());
-> 3
mysql>SELECT COERCIBILITY('abc');
-> 4The return values have the meanings shown in the following table. Lower values have higher precedence.
Coercibility Meaning Example 0Explicit collation Value with COLLATEclause1No collation Concatenation of strings with different collations 2Implicit collation Column value, stored routine parameter or local variable 3System constant USER()return value4Coercible Literal string 5Ignorable NULLor an expression derived fromNULL -
Returns the collation of the string argument.
mysql>
SELECT COLLATION('abc');
-> 'latin1_swedish_ci'
mysql>SELECT COLLATION(_utf8'abc');
-> 'utf8_general_ci' -
Returns the connection ID (thread ID) for the connection. Every connection has an ID that is unique among the set of currently connected clients.
The value returned by
CONNECTION_ID()is the same type of value as displayed in theIDcolumn of theINFORMATION_SCHEMA.PROCESSLISTtable, theIdcolumn ofSHOW PROCESSLISToutput, and thePROCESSLIST_IDcolumn of the Performance Schemathreadstable.mysql>
SELECT CONNECTION_ID();
-> 23786 -
Returns the user name and host name combination for the MySQL account that the server used to authenticate the current client. This account determines your access privileges. The return value is a string in the
utf8character set.The value of
CURRENT_USER()can differ from the value ofUSER().mysql>
SELECT USER();
-> 'davida@localhost'
mysql>SELECT * FROM mysql.user;
ERROR 1044: Access denied for user ''@'localhost' to
database 'mysql'
mysql>SELECT CURRENT_USER();
-> '@localhost'The example illustrates that although the client specified a user name of
davida(as indicated by the value of theUSER()function), the server authenticated the client using an anonymous user account (as seen by the empty user name part of theCURRENT_USER()value). One way this might occur is that there is no account listed in the grant tables fordavida.Within a stored program or view,
CURRENT_USER()returns the account for the user who defined the object (as given by itsDEFINERvalue) unless defined with theSQL SECURITY INVOKERcharacteristic. In the latter case,CURRENT_USER()returns the object's invoker.Triggers and events have no option to define the
SQL SECURITYcharacteristic, so for these objects,CURRENT_USER()returns the account for the user who defined the object. To return the invoker, useUSER()orSESSION_USER().The following statements support use of the
CURRENT_USER()function to take the place of the name of (and, possibly, a host for) an affected user or a definer; in such cases,CURRENT_USER()is expanded where and as needed:For information about the implications that this expansion of
CURRENT_USER()has for replication in different releases of MySQL 5.5, see Section 17.4.1.8, “Replication of CURRENT_USER()”. -
Returns the default (current) database name as a string in the
utf8character set. If there is no default database,DATABASE()returnsNULL. Within a stored routine, the default database is the database that the routine is associated with, which is not necessarily the same as the database that is the default in the calling context.mysql>
SELECT DATABASE();
-> 'test'If there is no default database,
DATABASE()returnsNULL. -
A
SELECTstatement may include aLIMITclause to restrict the number of rows the server returns to the client. In some cases, it is desirable to know how many rows the statement would have returned without theLIMIT, but without running the statement again. To obtain this row count, include aSQL_CALC_FOUND_ROWSoption in theSELECTstatement, and then invokeFOUND_ROWS()afterward:mysql>
SELECT SQL_CALC_FOUND_ROWS * FROMtbl_name
->WHERE id > 100 LIMIT 10;
mysql>SELECT FOUND_ROWS();The second
SELECTreturns a number indicating how many rows the firstSELECTwould have returned had it been written without theLIMITclause.In the absence of the
SQL_CALC_FOUND_ROWSoption in the most recent successfulSELECTstatement,FOUND_ROWS()returns the number of rows in the result set returned by that statement. If the statement includes aLIMITclause,FOUND_ROWS()returns the number of rows up to the limit. For example,FOUND_ROWS()returns 10 or 60, respectively, if the statement includesLIMIT 10orLIMIT 50, 10.The row count available through
FOUND_ROWS()is transient and not intended to be available past the statement following theSELECT SQL_CALC_FOUND_ROWSstatement. If you need to refer to the value later, save it:mysql>
SELECT SQL_CALC_FOUND_ROWS * FROM ... ;
mysql>SET @rows = FOUND_ROWS();If you are using
SELECT SQL_CALC_FOUND_ROWS, MySQL must calculate how many rows are in the full result set. However, this is faster than running the query again withoutLIMIT, because the result set need not be sent to the client.SQL_CALC_FOUND_ROWSandFOUND_ROWS()can be useful in situations when you want to restrict the number of rows that a query returns, but also determine the number of rows in the full result set without running the query again. An example is a Web script that presents a paged display containing links to the pages that show other sections of a search result. UsingFOUND_ROWS()enables you to determine how many other pages are needed for the rest of the result.The use of
SQL_CALC_FOUND_ROWSandFOUND_ROWS()is more complex forUNIONstatements than for simpleSELECTstatements, becauseLIMITmay occur at multiple places in aUNION. It may be applied to individualSELECTstatements in theUNION, or global to theUNIONresult as a whole.The intent of
SQL_CALC_FOUND_ROWSforUNIONis that it should return the row count that would be returned without a globalLIMIT. The conditions for use ofSQL_CALC_FOUND_ROWSwithUNIONare:The
SQL_CALC_FOUND_ROWSkeyword must appear in the firstSELECTof theUNION.The value of
FOUND_ROWS()is exact only ifUNION ALLis used. IfUNIONwithoutALLis used, duplicate removal occurs and the value ofFOUND_ROWS()is only approximate.If no
LIMITis present in theUNION,SQL_CALC_FOUND_ROWSis ignored and returns the number of rows in the temporary table that is created to process theUNION.
Beyond the cases described here, the behavior of
FOUND_ROWS()is undefined (for example, its value following aSELECTstatement that fails with an error).ImportantFOUND_ROWS()is not replicated reliably using statement-based replication. This function is automatically replicated using row-based replication. LAST_INSERT_ID(),LAST_INSERT_ID(expr)With no argument,
LAST_INSERT_ID()returns a 64-bit value representing the first automatically generated value successfully inserted for anAUTO_INCREMENTcolumn as a result of the most recently executedINSERTstatement. The value has a type ofBIGINT UNSIGNEDas of MySQL 5.5.29,BIGINT(signed) before that. The value ofLAST_INSERT_ID()remains unchanged if no rows are successfully inserted.With an argument,
LAST_INSERT_ID()returns an unsigned integer as of MySQL 5.5.29, a signed integer before that.For example, after inserting a row that generates an
AUTO_INCREMENTvalue, you can get the value like this:mysql>
SELECT LAST_INSERT_ID();
-> 195The currently executing statement does not affect the value of
LAST_INSERT_ID(). Suppose that you generate anAUTO_INCREMENTvalue with one statement, and then refer toLAST_INSERT_ID()in a multiple-rowINSERTstatement that inserts rows into a table with its ownAUTO_INCREMENTcolumn. The value ofLAST_INSERT_ID()will remain stable in the second statement; its value for the second and later rows is not affected by the earlier row insertions. (However, if you mix references toLAST_INSERT_ID()andLAST_INSERT_ID(, the effect is undefined.)expr)If the previous statement returned an error, the value of
LAST_INSERT_ID()is undefined. For transactional tables, if the statement is rolled back due to an error, the value ofLAST_INSERT_ID()is left undefined. For manualROLLBACK, the value ofLAST_INSERT_ID()is not restored to that before the transaction; it remains as it was at the point of theROLLBACK.Prior to MySQL 5.5.35, this function was not replicated correctly if replication filtering rules were in use. (Bug #17234370, Bug #69861)
Within the body of a stored routine (procedure or function) or a trigger, the value of
LAST_INSERT_ID()changes the same way as for statements executed outside the body of these kinds of objects. The effect of a stored routine or trigger upon the value ofLAST_INSERT_ID()that is seen by following statements depends on the kind of routine:If a stored procedure executes statements that change the value of
LAST_INSERT_ID(), the changed value is seen by statements that follow the procedure call.For stored functions and triggers that change the value, the value is restored when the function or trigger ends, so following statements will not see a changed value.
The ID that was generated is maintained in the server on a per-connection basis. This means that the value returned by the function to a given client is the first
AUTO_INCREMENTvalue generated for most recent statement affecting anAUTO_INCREMENTcolumn by that client. This value cannot be affected by other clients, even if they generateAUTO_INCREMENTvalues of their own. This behavior ensures that each client can retrieve its own ID without concern for the activity of other clients, and without the need for locks or transactions.The value of
LAST_INSERT_ID()is not changed if you set theAUTO_INCREMENTcolumn of a row to a non-“magic” value (that is, a value that is notNULLand not0).ImportantIf you insert multiple rows using a single
INSERTstatement,LAST_INSERT_ID()returns the value generated for the first inserted row only. The reason for this is to make it possible to reproduce easily the sameINSERTstatement against some other server.For example:
mysql>
USE test;
Database changed
mysql>CREATE TABLE t (
->id INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
->name VARCHAR(10) NOT NULL
->);
Query OK, 0 rows affected (0.09 sec) mysql>INSERT INTO t VALUES (NULL, 'Bob');
Query OK, 1 row affected (0.01 sec) mysql>SELECT * FROM t;
+----+------+
| id | name |
+----+------+
| 1 | Bob |
+----+------+
1 row in set (0.01 sec) mysql>SELECT LAST_INSERT_ID();
+------------------+
| LAST_INSERT_ID() |
+------------------+
| 1 |
+------------------+
1 row in set (0.00 sec) mysql>INSERT INTO t VALUES
->(NULL, 'Mary'), (NULL, 'Jane'), (NULL, 'Lisa');
Query OK, 3 rows affected (0.00 sec)
Records: 3 Duplicates: 0 Warnings: 0 mysql> SELECT * FROM t;
+----+------+
| id | name |
+----+------+
| 1 | Bob |
| 2 | Mary |
| 3 | Jane |
| 4 | Lisa |
+----+------+
4 rows in set (0.01 sec) mysql>SELECT LAST_INSERT_ID();
+------------------+
| LAST_INSERT_ID() |
+------------------+
| 2 |
+------------------+
1 row in set (0.00 sec)Although the second
INSERTstatement inserted three new rows intot, the ID generated for the first of these rows was2, and it is this value that is returned byLAST_INSERT_ID()for the followingSELECTstatement.If you use
INSERT IGNOREand the row is ignored, theLAST_INSERT_ID()remains unchanged from the current value (or 0 is returned if the connection has not yet performed a successfulINSERT) and, for non-transactional tables, theAUTO_INCREMENTcounter is not incremented. ForInnoDBtables, theAUTO_INCREMENTcounter is incremented ifinnodb_autoinc_lock_modeis set to1or2, as demonstrated in the following example:mysql> USE test;
Database changed mysql> SELECT @@innodb_autoinc_lock_mode;
+----------------------------+
| @@innodb_autoinc_lock_mode |
+----------------------------+
| 1 |
+----------------------------+
1 row in set (0.00 sec) mysql> CREATE TABLE `t` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`val` INT(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `i1` (`val`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Query OK, 0 rows affected (0.02 sec) -- Insert two rows mysql> INSERT INTO t (val) VALUES (1),(2);
Query OK, 2 rows affected (0.00 sec)
Records: 2 Duplicates: 0 Warnings: 0 -- With auto_increment_offset=1, the inserted rows
-- result in an AUTO_INCREMENT value of 3 mysql> SHOW CREATE TABLE t\G
*************************** 1. row ***************************
Table: t
Create Table: CREATE TABLE `t` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`val` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `i1` (`val`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1
1 row in set (0.00 sec) -- LAST_INSERT_ID() returns the first automatically generated
-- value that is successfully inserted for the AUTO_INCREMENT column mysql> SELECT LAST_INSERT_ID();
+------------------+
| LAST_INSERT_ID() |
+------------------+
| 1 |
+------------------+
1 row in set (0.00 sec) -- The attempted insertion of duplicate rows fail but errors are ignored mysql> INSERT IGNORE INTO t (val) VALUES (1),(2);
Query OK, 0 rows affected (0.00 sec)
Records: 2 Duplicates: 2 Warnings: 0 -- With innodb_autoinc_lock_mode=1, the AUTO_INCREMENT counter
-- is incremented for the ignored rows mysql> SHOW CREATE TABLE t\G
*************************** 1. row ***************************
Table: t
Create Table: CREATE TABLE `t` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`val` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `i1` (`val`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1
1 row in set (0.00 sec) -- The LAST_INSERT_ID is unchanged becuase the previous insert was unsuccessful mysql> SELECT LAST_INSERT_ID();
+------------------+
| LAST_INSERT_ID() |
+------------------+
| 1 |
+------------------+
1 row in set (0.00 sec)See Section 14.11.6, “AUTO_INCREMENT Handling in InnoDB” for more information.
If
expris given as an argument toLAST_INSERT_ID(), the value of the argument is returned by the function and is remembered as the next value to be returned byLAST_INSERT_ID(). This can be used to simulate sequences:Create a table to hold the sequence counter and initialize it:
mysql>
CREATE TABLE sequence (id INT NOT NULL);
mysql>INSERT INTO sequence VALUES (0);Use the table to generate sequence numbers like this:
mysql>
UPDATE sequence SET id=LAST_INSERT_ID(id+1);
mysql>SELECT LAST_INSERT_ID();The
UPDATEstatement increments the sequence counter and causes the next call toLAST_INSERT_ID()to return the updated value. TheSELECTstatement retrieves that value. Themysql_insert_id()C API function can also be used to get the value. See Section 23.8.7.37, “mysql_insert_id()”.
You can generate sequences without calling
LAST_INSERT_ID(), but the utility of using the function this way is that the ID value is maintained in the server as the last automatically generated value. It is multi-user safe because multiple clients can issue theUPDATEstatement and get their own sequence value with theSELECTstatement (ormysql_insert_id()), without affecting or being affected by other clients that generate their own sequence values.Note that
mysql_insert_id()is only updated afterINSERTandUPDATEstatements, so you cannot use the C API function to retrieve the value forLAST_INSERT_ID(after executing other SQL statements likeexpr)SELECTorSET.-
Before MySQL 5.5.5,
ROW_COUNT()returns the number of rows changed, deleted, or inserted by the last statement if it was anUPDATE,DELETE, orINSERT. For other statements, the value may not be meaningful.As of MySQL 5.5.5,
ROW_COUNT()returns a value as follows:DDL statements: 0. This applies to statements such as
CREATE TABLEorDROP TABLE.DML statements other than
SELECT: The number of affected rows. This applies to statements such asUPDATE,INSERT, orDELETE(as before), but now also to statements such asALTER TABLEandLOAD DATA INFILE.SELECT: -1 if the statement returns a result set, or the number of rows “affected” if it does not. For example, forSELECT * FROM t1,ROW_COUNT()returns -1. ForSELECT * FROM t1 INTO OUTFILE ',file_name'ROW_COUNT()returns the number of rows written to the file.SIGNALstatements: 0.
For
UPDATEstatements, the affected-rows value by default is the number of rows actually changed. If you specify theCLIENT_FOUND_ROWSflag tomysql_real_connect()when connecting to mysqld, the affected-rows value is the number of rows “found”; that is, matched by theWHEREclause.For
REPLACEstatements, the affected-rows value is 2 if the new row replaced an old row, because in this case, one row was inserted after the duplicate was deleted.For
INSERT ... ON DUPLICATE KEY UPDATEstatements, the affected-rows value per row is 1 if the row is inserted as a new row, 2 if an existing row is updated, and 0 if an existing row is set to its current values. If you specify theCLIENT_FOUND_ROWSflag, the affected-rows value is 1 (not 0) if an existing row is set to its current values.The
ROW_COUNT()value is similar to the value from themysql_affected_rows()C API function and the row count that the mysql client displays following statement execution.mysql>
INSERT INTO t VALUES(1),(2),(3);
Query OK, 3 rows affected (0.00 sec)
Records: 3 Duplicates: 0 Warnings: 0 mysql>SELECT ROW_COUNT();
+-------------+
| ROW_COUNT() |
+-------------+
| 3 |
+-------------+
1 row in set (0.00 sec) mysql>DELETE FROM t WHERE i IN(1,2);
Query OK, 2 rows affected (0.00 sec) mysql>SELECT ROW_COUNT();
+-------------+
| ROW_COUNT() |
+-------------+
| 2 |
+-------------+
1 row in set (0.00 sec)ImportantROW_COUNT()is not replicated reliably using statement-based replication. This function is automatically replicated using row-based replication. -
This function is a synonym for
DATABASE(). -
SESSION_USER()is a synonym forUSER(). -
SYSTEM_USER()is a synonym forUSER(). -
Returns the current MySQL user name and host name as a string in the
utf8character set.mysql>
SELECT USER();
-> 'davida@localhost'The value indicates the user name you specified when connecting to the server, and the client host from which you connected. The value can be different from that of
CURRENT_USER(). -
Returns a string that indicates the MySQL server version. The string uses the
utf8character set. The value might have a suffix in addition to the version number. See the description of theversionsystem variable in Section 5.1.4, “Server System Variables”.This function is unsafe for statement-based replication. Beginning with MySQL 5.5.1, a warning is logged if you use this function when
binlog_formatis set toSTATEMENT. (Bug #47995)mysql>
SELECT VERSION();
-> '5.5.53-standard'
MySQL Information Functions的更多相关文章
- Mysql String Functions
SUBSTRING_INDEX(str,delim,count) 按标识符截取指定长度的字符串 mysql); -> 'www.mysql' mysql); -> 'mysql.com' ...
- 如何将MySQL help contents的内容有层次的输出
经常会遇到这种情况,在一个不能上网的环境通过MySQL客户端登录数据库,想执行一个操作,却忘了操作的具体语法,各种不方便. 其实,MySQL数据库内置了帮助文档,通过help contents即可查看 ...
- 高效查看MySQL帮助文档的方法
在mysql的使用过程中, 可能经常会遇到以下问题: 某个操作语法忘记了, 如何快速查找? 如何快速知道当前版本上某个字段类型的取值范围? 当前版本都支持哪些函数?希望有例子说明.. 当前版本是否支持 ...
- MySQL开发总结(有点长..耐心看)
一.理解MySQL基本概念 1.MySQL软件:MySQL实际上就是一软件,是一工具,是关系型数据库管理系统软件 2.MySQL数据库:就是按照数据结构来组织.存储和管理数据的仓库 3.MySQL数据 ...
- 高效查看MySQL帮助文档的方法 (转)
在mysql的使用过程中, 可能经常会遇到以下问题: 某个操作语法忘记了, 如何快速查找? 如何快速知道当前版本上某个字段类型的取值范围? 当前版本都支持哪些函数?希望有例子说明.. 当前版本是否支持 ...
- mysql开发总结
一.理解MySQL基本概念 1.MySQL软件:MySQL实际上就是一软件,是一工具,是关系型数据库管理系统软件 2.MySQL数据库:就是按照数据结构来组织.存储和管理数据的仓库 3.MySQL数据 ...
- mysql使用笔记(网易Mysql实用手册)---1
1帮助使用 1.1按层次查看帮助 1 当不知道帮助可提供什么时,可通过MySQL内置帮助文档,一层层往下看. 命令: mysql> ? contents ? 等效help,该文档涵盖了数据库操作 ...
- mysql limit查询(分页查询)探究
MySQL的Limit子句 LIMIT offset,length Limit子句可以被用于强制 SELECT 语句返回指定的记录数.Limit接受一个或两个数字参数.参数必须是一个整数常量.如果给定 ...
- 【数据库】MySQL 函数大全包含示例(涵盖了常用如时间、数字、字符串处理、数据流函数的和一些冷门的)
ps:博客园markdown不能自动生成列表,更好的阅读体验可访问我的个人博客http://www.isspark.com/archives/mysqlFunctionDesc 数学函数(Mathem ...
随机推荐
- JS图片懒加载
简介 当页面图片太多时,加载速度就会很慢.尤其是用2G/3G/4G访问页面,不仅页面慢,而且还会用掉很多流量.图片懒加载的原理就是将页面内所有需要加载的图片全部换成一张默认的图片(一般尺寸很小),只有 ...
- lua的私有性(privacy)
很多人认为私有性是面向对象语言的应有的一部分.每个对象的状态应该是这个对象自己的事情.在一些面向对象的语言中,比如C++和Java你可以控制对象成员变量或者成员方法是否私有.其他一些语言比如Small ...
- html5 浏览器端数据库
为什么使用浏览器端数据库:随着浏览器的处理能力不断增强,越来越多的网站开始考虑,将大量数据储存在客户端,这样可以减少用户等待从服务器获取数据的时间. 一.localStorage — 本地存储 可 ...
- Spring-Context的注解实现依赖注入功能
使用Spring-Context的注解实现依赖注入功能. Demo要点: 本例子中主要使用Annotation功能来实现对MoviceService的注入.我们将Cinema.java的头部标注为@C ...
- [转] SSH原理与运用(2):远程操作与端口转发
英文:阮一峰 链接:http://www.ruanyifeng.com/blog/2011/12/ssh_port_forwarding.html 接着前一次的文章,继续介绍SSH的用法. (Imag ...
- Html与CSS快速入门01-基础概念
Web前端技术一直是自己的薄弱环节,经常为了调节一个简单的样式花费大量的时间.最近趁着在做前端部分的开发,果断把这部分知识成体系的恶补一下.内容相对都比较简单,很类似工具手册的学习,但目标是熟练掌握. ...
- IE和firefox火狐在JS、css兼容区别
1.firefox不能对innerText支持. firefox支持innerHTML但却不支持innerText,它支持textContent来实现innerText,不过默认把多余的空格也保留了. ...
- Web Workers 的基本信息
问题:JavaScript 并行性 要将有趣的应用(例如从侧重服务器端的实施)移植到客户端 JavaScript,存在很多制约瓶颈.其中包括浏览器兼容性.静态类型.可访问性和性能.幸运的是,随着浏览器 ...
- Linux的学习--配置LNMP环境
最近,回到公司,发现电脑都换成linux系统了...很无力... 配置环境,跑起项目来就花了一天...额...在这里记录一下-- 系统是ubuntu 12.04. 一.安装nginx1:ubuntu因 ...
- 算法与数据结构(2)--英雄会第三届在线编程大赛:几个bing
基础知识的回顾不再写到这里面了,会写一些算法算法的解答或者读一些相关书籍的笔记. 今天做了一道算法题,来自微软必应·英雄会第三届在线编程大赛:几个bing? 做出来了...但不知道为啥执行测试用例失败 ...