mysql 中的字符串连接 CONCAT(str1,str2,...)
返回来自于参数连结的字符串。如果任何参数是NULL,返回NULL。可以有超过2个的参数。一个数字参数被变换为等价的字符串形式。
mysql> select CONCAT('My', 'S', 'QL');
-> 'MySQL'
mysql> select CONCAT('My', NULL, 'QL');
-> NULL
mysql> select CONCAT(14.3);
-> '14.3'
如:update test set ID=concat(ID,'ABC');
放在前面就连接到前面,放在后面就连接在后面。
相关文档:
<?php
$db_name="new";
mysql_connect("localhost","root","123456");
mysql_select_db($db_name);
$tb=mysql_list_tables($db_name);
$sql="";
while($query=mysql_fetch_row($tb)){
$sql="";$table_sql="";
$sql.= get_table_fn($query[0]);
get_table_row($que ......
PHP新的连接MySQL方法mysqli
1. 开启PHP的API支持
(1)首先修改您的php.ini的配置文件。
查找下面的语句:
;extension=php_mysqli.dll
将其修改为:
extension=php_mysqli.dll
......
Administration 管理
Kill a Thread 结束一个线程
mysql > KILL 999;
Optimize Table 优化表
mysql > OPTIMEZE TABLE foo;
Reload Users Permissions 刷新MySQL系统权限相关表
mysql > FLUSH PRIVILEGES;
Repair Table 修复表
mysql > ......
To support MySQL Cluster, you will need to update
my.cnf
as shown in the following example.
You may also specify these parameters on the command line when
invoking the executables.
Note
The options shown here should not be confused with thos ......