Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

mysqlµÄ×Ö·û´®º¯Êý

¶ÔÓÚÕë¶Ô×Ö·û´®Î»ÖõIJÙ×÷£¬µÚÒ»¸öλÖñ»±ê¼ÇΪ1¡£
ASCII(str) ·µ»Ø×Ö·û´®strµÄ×î×óÃæ×Ö·ûµÄASCII´úÂëÖµ¡£Èç¹ûstrÊÇ¿Õ×Ö·û´®£¬·µ»Ø0¡£Èç¹ûstrÊÇNULL£¬·µ»ØNULL¡£
mysql> select ASCII('2');
-> 50
mysql> select ASCII(2);
-> 50
mysql> select ASCII('dx');
-> 100
Ò²¿É²Î¼ûORD()º¯Êý¡£
ORD(str) Èç¹û×Ö·û´®str×î×óÃæ×Ö·ûÊÇÒ»¸ö¶à×Ö½Ú×Ö·û£¬Í¨¹ýÒÔ¸ñʽ((first byte ASCII code)*256+(second byte ASCII code))[*256+third byte ASCII code...]·µ»Ø×Ö·ûµÄASCII´úÂëÖµÀ´·µ»Ø¶à×Ö½Ú×Ö·û´úÂë¡£Èç¹û×î×óÃæµÄ×Ö·û²»ÊÇÒ»¸ö¶à×Ö½Ú×Ö·û¡£·µ»ØÓëASCII()º¯Êý·µ»ØµÄÏàֵͬ¡£
mysql> select ORD('2');
-> 50

CONV(N,from_base,to_base) ÔÚ²»Í¬µÄÊý×Ö»ùÖ®¼ä±ä»»Êý×Ö¡£·µ»ØÊý×ÖNµÄ×Ö·û´®Êý×Ö£¬´Ófrom_base»ù±ä»»Îªto_base»ù£¬Èç¹ûÈκβÎÊýÊÇNULL£¬·µ»ØNULL¡£²ÎÊýN½âÊÍΪһ¸öÕûÊý£¬µ«ÊÇ¿ÉÒÔÖ¸¶¨ÎªÒ»¸öÕûÊý»òÒ»¸ö×Ö·û´®¡£×îС»ùÊÇ2ÇÒ×î´óµÄ»ùÊÇ36¡£Èç¹ûto_baseÊÇÒ»¸ö¸ºÊý£¬N±»ÈÏΪÊÇÒ»¸öÓзûºÅÊý£¬·ñÔò£¬N±»µ±×÷ÎÞ·ûºÅÊý¡£ CONVÒÔ64λµã¾«¶È¹¤×÷¡£
mysql> select CONV("a",16,2);
-> '1010'
mysql> select CONV("6E",18,8);
-> '172'
mysql> select CONV(-17,10,-18);
-> '-H'
mysql> select CONV(10+"10"+'10'+0xa,10,10);
-> '40'

BIN(N) ·µ»Ø¶þ½øÖÆÖµNµÄÒ»¸ö×Ö·û´®±íʾ£¬ÔÚ´ËNÊÇÒ»¸ö³¤ÕûÊý(BIGINT)Êý×Ö£¬ÕâµÈ¼ÛÓÚCONV(N,10,2)¡£Èç¹ûNÊÇNULL£¬·µ»ØNULL¡£
mysql> select BIN(12);
-> '1100'
OCT(N) ·µ»Ø°Ë½øÖÆÖµNµÄÒ»¸ö×Ö·û´®µÄ±íʾ£¬ÔÚ´ËNÊÇÒ»¸ö³¤ÕûÐÍÊý×Ö£¬ÕâµÈ¼ÛÓÚCONV(N,10,8)¡£Èç¹ûNÊÇNULL£¬·µ»ØNULL¡£
mysql> select OCT(12);
-> '14'

HEX(N) ·µ»ØÊ®Áù½øÖÆÖµNÒ»¸ö×Ö·û´®µÄ±íʾ£¬ÔÚ´ËNÊÇÒ»¸ö³¤ÕûÐÍ(BIGINT)Êý×Ö£¬ÕâµÈ¼ÛÓÚCONV(N,10,16)¡£Èç¹ûNÊÇNULL£¬·µ»ØNULL¡£
mysql> select HEX(255);
-> 'FF'

CHAR(N,...) CHAR()½«²ÎÊý½âÊÍΪÕûÊý²¢ÇÒ·µ»ØÓÉÕâЩÕûÊýµÄASCII´úÂë×Ö·û×é³ÉµÄÒ»¸ö×Ö·û´®¡£NULLÖµ±»Ìø¹ý¡£
mysql> select CHAR(77,121,83,81,'76');
-> 'MySQL'
mysql> select CHAR(77,77.3,'77.3');
-> 'MMM'

CONCAT(str1,str2,...) ·µ»ØÀ´×ÔÓÚ²ÎÊýÁ¬½áµÄ×Ö·û´®¡£Èç¹ûÈκβÎÊýÊÇNULL£¬·µ»ØNULL¡£¿ÉÒÔÓг¬¹ý2¸öµÄ²


Ïà¹ØÎĵµ£º

MySQLµÄmy.cnfÓÅ»¯ÊµÀý

http://linux.chinaitlab.com/MYSQL/524755_2.html
http://bbs.chinaunix.net/archiver/?tid-809159.html
 ÔÚApache, PHP,
MySQLµÄÌåϵ¼Ü¹¹ÖУ¬MySQL¶ÔÓÚÐÔÄܵÄÓ°Ïì×î´ó£¬Ò²ÊǹؼüµÄºËÐIJ¿·Ö¡£¶ÔÓÚDiscuz!ÂÛ̳³ÌÐòÒ²ÊÇÈç´Ë£¬MySQLµÄÉèÖÃÊÇ·ñºÏÀíÓÅ»¯£¬Ö±½Ó
Ó°Ïìµ½ÂÛ̳µÄËٶȺͳÐÔØÁ¿£¡Í¬Ê±£¬MySQLÒ²ÊÇÓÅ»¯ÄѶÈ×î´ó ......

Mysql ±í½á¹¹

MYSQLÖÐÐ޸ıí½á¹¹ALTERÓ÷¨
ALTER TABLE Result ADD xinlinDoc longblob;
ALTER TABLE Result ADD xinlinDocName varchar(50);
ÆäËüʵÀý£º
CREATE TABLE t1(a INTEGER,b CHAR(10)); // ´´½¨µÄ±ít1¿ªÊ¼
ALTER TABLE t1 RENAME t2; // ÖØÃüÃû±í£¬´Ót1µ½t2
ALTER TABLE t2 MODIFY a TINYINT NOT NULL, CHANGE b c CHAR( ......

linux ÏÂc++¼°mysql¶Ôʱ¼ä´¦ÀíµÄ³£Óü¼ÇÉ

mysql ½Øȡijһ¸öʱ¼ä(datetimeÀàÐÍ)µÄÈÕÆÚ£º
·½·¨1£ºselect date(row_name) from table_name where row = row1;
·½·¨2£ºselect left(row_name, 10) from table_name where row = row1;
·½·¨3£ºselect cast(row_name as char[10]) from table_name where row = row1;
È¡µÃij¸öÈÕÆÚµÄtime_tÊýÖµ£ºselect unix_times ......

linuxϲ鿴nginx£¬apache£¬mysql£¬phpµÄ±àÒë²ÎÊý

ÓÐʱºònginx£¬apache£¬mysql£¬php±àÒëÍêÁËÏë¿´¿´±àÒë²ÎÊý¿ÉÒÔÓÃÒÔÏ·½·¨
nginx±àÒë²ÎÊý£º
#/usr/local/nginx/sbin/nginx -V
CODE:
nginx version: nginx/0.6.32
built by gcc 4.1.2 20071124 (Red Hat 4.1.2-42)
configure arguments: --user=www --group=www --prefix=/usr/local/nginx/ --with-http_stub_status_mo ......

linux·þÎñÆ÷ÓÃlighttpd+mysql5+php5+SupeSite/X

Ò»¡¢°²×°ÏµÍ³»·¾³
1¡¢ÏµÍ³£ºcentos5
2¡¢²âÊÔÔÚvm5.5
×¼±¸Èí¼þ
lighttpd-1.4.18
ÏÂÔصØÖ·
mysql-5.0.41
part1ÏÂÔصØÖ·
part2ÏÂÔصØÖ·
part3ÏÂÔصØÖ·
php-5.2.3
ÏÂÔصØÖ·
SupeSite/X-Space
part1ÏÂÔصØÖ·
part2ÏÂÔصØÖ·
part3ÏÂÔصØÖ·
discuz
ÏÂÔصØÖ·
¶þ¡¢´î½¨web·þÎñÆ÷°²×°¹ý³Ì
1¡¢mysql5°²×°
$ tar zx ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ