CONCAT mysql
- font size decrease font size increase font size
使用方法:
CONCAT(str1,str2,…)
返回结果为连接参数产生的字符串。如有任何一个参数为NULL ,则返回值为 NULL。
使用方法:
CONCAT(str1,str2,…)
返回结果为连接参数产生的字符串。如有任何一个参数为NULL ,则返回值为 NULL。
如果所有参数均为非二进制字符串,则结果为非二进制字符串。
如果自变量中含有任一二进制字符串,则结果为一个二进制字符串。
一个数字参数被转化为与之相等的二进制字符串格式;若要避免这种情况,可使用显式类型 cast, 例如:
SELECT CONCAT(CAST(int_col AS CHAR), char_col)
MySQL的concat函数可以连接一个或者多个字符串,如
mysql> select concat('10');
+--------------+
| concat('10') |
+--------------+
| 10 |
+--------------+
1 row in set (0.00 sec)
mysql> select concat('11','22','33');
+------------------------+
| concat('11','22','33') |
+------------------------+
| 112233 |
+------------------------+
1 row in set (0.00 sec)
MySQL的concat函数在连接字符串的时候,只要其中一个是NULL,那么将返回NULLmysql> select concat('11','22',null);
+------------------------+
| concat('11','22',null) |
+------------------------+
| NULL |
+------------------------+
1 row in set (0.00 sec)
Last modified onSunday, 14 October 2012 04:07
( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 169 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0016 | 415288 | {main}( ) | .../index.php:0 |
2 | 0.0899 | 4720360 | Joomla\CMS\Application\SiteApplication->execute( ) | .../index.php:49 |
3 | 0.0899 | 4720360 | Joomla\CMS\Application\SiteApplication->doExecute( ) | .../CMSApplication.php:196 |
4 | 0.3041 | 12448520 | Joomla\CMS\Application\SiteApplication->dispatch( ) | .../SiteApplication.php:233 |
5 | 0.3047 | 12472864 | Joomla\CMS\Component\ComponentHelper::renderComponent( ) | .../SiteApplication.php:194 |
6 | 0.3054 | 12528192 | Joomla\CMS\Component\ComponentHelper::executeComponent( ) | .../ComponentHelper.php:377 |
7 | 0.3057 | 12557016 | require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ) | .../ComponentHelper.php:402 |
8 | 0.3136 | 12992424 | K2ControllerItem->execute( ) | .../k2.php:64 |
9 | 0.3136 | 12992424 | K2ControllerItem->display( ) | .../BaseController.php:710 |
10 | 0.3228 | 13717624 | K2ControllerItem->display( ) | .../item.php:78 |
11 | 0.3228 | 13717624 | K2ControllerItem->display( ) | .../controller.php:19 |
12 | 0.3269 | 14113992 | Joomla\CMS\Cache\Controller\ViewController->get( ) | .../BaseController.php:663 |
13 | 0.3315 | 14134360 | K2ViewItem->display( ) | .../ViewController.php:102 |
14 | 0.4818 | 17050744 | K2ViewItem->display( ) | .../view.html.php:742 |
15 | 0.4819 | 17050744 | K2ViewItem->loadTemplate( ) | .../HtmlView.php:230 |
16 | 0.4877 | 17230944 | include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ) | .../HtmlView.php:701 |
- Published in MYSQL
- Read 1521 times
( ! ) Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0016 | 415288 | {main}( ) | .../index.php:0 |
2 | 0.0899 | 4720360 | Joomla\CMS\Application\SiteApplication->execute( ) | .../index.php:49 |
3 | 0.0899 | 4720360 | Joomla\CMS\Application\SiteApplication->doExecute( ) | .../CMSApplication.php:196 |
4 | 0.3041 | 12448520 | Joomla\CMS\Application\SiteApplication->dispatch( ) | .../SiteApplication.php:233 |
5 | 0.3047 | 12472864 | Joomla\CMS\Component\ComponentHelper::renderComponent( ) | .../SiteApplication.php:194 |
6 | 0.3054 | 12528192 | Joomla\CMS\Component\ComponentHelper::executeComponent( ) | .../ComponentHelper.php:377 |
7 | 0.3057 | 12557016 | require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ) | .../ComponentHelper.php:402 |
8 | 0.3136 | 12992424 | K2ControllerItem->execute( ) | .../k2.php:64 |
9 | 0.3136 | 12992424 | K2ControllerItem->display( ) | .../BaseController.php:710 |
10 | 0.3228 | 13717624 | K2ControllerItem->display( ) | .../item.php:78 |
11 | 0.3228 | 13717624 | K2ControllerItem->display( ) | .../controller.php:19 |
12 | 0.3269 | 14113992 | Joomla\CMS\Cache\Controller\ViewController->get( ) | .../BaseController.php:663 |
13 | 0.3315 | 14134360 | K2ViewItem->display( ) | .../ViewController.php:102 |
14 | 0.4818 | 17050744 | K2ViewItem->display( ) | .../view.html.php:742 |
15 | 0.4819 | 17050744 | K2ViewItem->loadTemplate( ) | .../HtmlView.php:230 |
16 | 0.4877 | 17230944 | include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ) | .../HtmlView.php:701 |