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

mysqlϵķÖÒ³´æ´¢¹ý³Ì

CREATE PROCEDURE pro_page(
 in _sql varchar(1000),
 in _order varchar(1000),
 in _pagecurrent int,
 in _pagesize int
)
BEGIN
 if _pagesize<=1 then
  set _pagesize=20;
 end if;
 if _pagecurrent < 1 then
  set _pagecurrent = 1;
 end if;
 set @strsql = concat(_sql,' ',_order,' limit ',_pagecurrent*_pagesize-_pagesize,',',_pagesize);
 prepare stmtsql from @strsql;
 execute stmtsql;
 deallocate prepare stmtsql; 
END;


Ïà¹ØÎĵµ£º

wampÈçºÎÐÞ¸ÄmysqlĬÈÏ¿ÕÃÜÂë

cmdÏÂÇл»µ½ mysql °²×°Ä¿Â¼
Àý
d:/mysql/bin   (Èç¹ûÓÃWAMP°²×°ÔòÊÇD:\wamp\bin\mysql\mysql5.1.30\bin)
Ç°Ì᣺mysqlÓû§rootÃÜÂëΪ¿Õ.
ÊäÈë mysql -u root mysql
mysql> ״̬ÏÂÊäÈë   update user set password=password('ÐÂÃÜÂë') where user='root';
»ØÏÔ   
Query OK, 0 rows ......

½«mysqlµÄ±íµ¼³öµ½excel

  ÓÃMYSQLÓï¾ä£º  
  mysql   -uroot   -p^^^^^  -e   "select   *   from   test.table2"   >   d:\a.xls
ÆäÖÐtestΪÊý¾Ý¿â table2ΪÆäÖÐµÄ±í    d:\a.xlsΪ±íλÖà ......

mysql²éѯ»º´æµÄÄÚ´æËéƬ

query_cache_min_res_unit   ²éѯ»º´æ·ÖÅäµÄ×îС¿éµÄ´óС(×Ö½Ú)
query_alloc_block_size    Ϊ²éѯ·ÖÎöºÍÖ´Ðйý³ÌÖд´½¨µÄ¶ÔÏó·ÖÅäµÄÄÚ´æ¿é´óС
Qcache_free_blocks´ú±íÄÚ´æ×ÔÓÉ¿éµÄ¶àÉÙ£¬·´Ó³ÁËÄÚ´æËéƬµÄÇé¿ö
==========================
1£©µ±²éѯ½øÐеÄʱºò£¬Mysql°Ñ²éѯ½á¹û±£´æÔÚqurey ......

mysqlÃüÁîÐв»Ö´ÐкÍÃüÁîÐÐÖÐÎÄÂÒÂëµÄ½â¾ö


1£ºMysql ÃüÁî²»¿ÉÒÔÖ´ÐÐ
Ô­Òò £ººÇºÇ ±ÈÈç show databases µÄÃüÁî £¬Ö´ÐÐÍêÖ®ºó ɶҲûÓÐ £¬×Ðϸ ÕÒÁËÔ­Òò £¬Oh my god  ÉÙÁË ·ÖºÅ¡£
Ӧд³É£ºshow databases;
2£ºÃüÁîÐÐÖÐÎÄÂÒÂëÎÊÌâ
ÏÖÏó£ºmysqlµÄĬÈϱàÂëÉèÖÃΪutf-8£¬Ò³ÃæÒÔutf-8µÄ±àÂ뷽ʽдÈëµ½Êý¾Ý¿â¡£Óù¤¾ß²é¿´Ò»ÇÐÕý³££¬µ«´ÓmysqlµÄÃüÁîÐжÁÊý¾Ý³öÀ´× ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ