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

Ê×ÓÃMYSQLË÷ÒýµÄ¿ì¸Ð

ÓÃÁËMYSQLÒ»Äê¶à£¬ÇÒÒ»Ö±±»MYSQLµÄ¿ìËÙ²éѯËùÎüÒý£¬¿É½ñÌìÔõôÅöʯͷÁË£¿
1Dp4V*W+t0
3p)o{3s.a'^Qr0
Ô­À´¾ÍÊÇË÷ÒýÔÚ×ö¹Ö¡£ÓÉÓÚ±¾ÈËÊÇÒµÓà°®ºÃ×ÔѧPHP+MYSQL¿ª·¢£¬ËùÒÔÔÚÀíÂÛÓÅ»¯·½ÃæÒ»°ã¿¼ÂÇÉõÉÙ£¬»ù±¾²»ÓÃ×Ö¶ÎË÷ÒýÈ¥×öMYSQLÓÅ»¯£¬¿ÉÄÜÒ²ÊÇÎÒ²»»áÓðɡ££¨×Ü¿´ÊéÉÏ˵Ë÷ÒýµÄºÃ´¦ºÃ´¦µÄ£¬½ñÌì×Åʵ³¢µ½ÌðÍ·ÁË¡££©PHPChina ¿ªÔ´ÉçÇøÃÅ»§Eg'Z-G{P:B-MM
D
Bsb fA�O*f7@S$X0
u5Ru%Ju0
½²½²¾­¹ý£ºPHPChina ¿ªÔ´ÉçÇøÃÅ»§6qF"f+t/c3B5yS7x4p
h-\IO!I
U#D0
¸ù¾Ý³ÌÐòÂß¼­ÐèÒª£¬ÎÒµÃÓÃPHP
·´
¸´È¥²Ù×÷Õâ¸ö°ÙÍòÌõÊý¾Ý±í3-4´Î£¬ÆäÖÐÓÐselectºÍupdate(updateµÄʱºòÐèҪȥÉú³ÉÒ»¸öÎı¾Îļþ)£¬delete£¨deleteµÄʱºò
ÐèҪȥ°ÑÕâ¸öÎļþɾ³ý£©£¬µ«°Ñ³ÌÐòÂß¼­·â×°£¬²âÊÔ³ÌÐòʱ£¬²Ù×÷ºóȷʵÈÃÈËÐÄÍ´ÁË£¬ÉõÖÁÓÐ×¼±¸ÉÏÒ»¸öSQL SERVERÈ¥²âÊÔЧÂÊÎÊÌâµÄÄîÍ·¡£×îºó¾­¼¼Êõ
×Ü
¼àµãÁËһϣ¬ËµÈðѳÌÐòÿ¶Î¼Ó¸öÖ´ÐÐʱ¼äÔÙ¿´¿´¡£ÎÒÕÕ×ö£¬ÔÚupdateÕâÒ»¿éÈ¥½øÐвâÊÔ£¬·¢ÏÖÎÊÌâ²¢²»ÊÇÔÚÕâ¸ö°ÙÍòÌõÊý¾Ý±íÉÏ£¬ÎҾͰÑÁíÒ»¶ÎÉú³ÉÎļþÎÄ
±¾ÎļþµÄ³ÌÐòÄõô£¬²âÊÔÒ»ÇÐÕý³££¬Ò»´Îupdate300Ìõ¼Ç¼ʱ¼äÔÚ0.08Ãë×óÓҾͲÙ×÷ÍêÁË¡£±¾ÒÔΪÎÊÌâÊdzöÔÚÉú³ÉÎı¾ÎļþÉÏ£¬ÇÒÔÚSQLÓï¾äÉϲ»´æ
ÔÚÎÊÌ⣬ÎÒÏë¼´ÊÇÓëMYSQLÎ޹أ¬¾Í°ÑÁíÒ»¶ÎдÎļþÎļþµÄ²Ù×÷ÄõôÁËÏÈ¡£PHPChina ¿ªÔ´ÉçÇøÃÅ»§D[4z�LM3I
{C
~W)[ U/?:s7g8F8e0
½Ó×ÅÎÒÔÙ²âÊÔdelete²¿·ÖÊDz»ÊÇÒ²´æÔÚ×ÅÕâ¸öÎÊÌ⣬×îºóÎÒ°´ÉÏÃæµÄ²½ÖèͬÑùÒ²°Ñɾ³ýÎļþµÄÒ»²¿·Ö³ÌÐòÄõôÁËÏÈ£¬ÔÙ¿´²âÊÔʱ¼ä£¬·¢ÏÖÎÊÌâÒÀÈ»´æÔÚ£¬ÓôÃÆÁËÒ»»á£¬¼ÌÐø²âÊÔÕâ¶Î´úÂë
¡£Õâ¶Î´úÂëÊÇÒ»¸ö±í¹ØÁª²Ù×÷£¨ÏȲéѯºóɾ³ý£©£¬²âÊÔ·¢ÏÖÕâ¸ö¹ØÁª²Ù×÷»¨ÁË7ÃëÖÓʱ¼ä¡£ÎÒÏ룬һ¸öÒ»¸ö²ð¿ªÊÔ£¬ÆäÖÐÎÒÓÖ²ð·Ö²âÊÔ£¬°Ñɾ³ýµÄSQLÓï¾ä²¿·ÖÄõô£¬ÔÙ¿´²éѯ²¿·ÖµÄʱ¼ä²âÊÔ£¬½á¹û½ö²éѯ²¿·Ö»¨È¥ÁË5Ãë¡£ÎҾͷ¢ÏÖÎÊÌâ¿Ï¶¨ÊdzöÔÚÁ˲éѯÓï¾äÉÏÁË¡£PHPChina ¿ªÔ´ÉçÇøÃÅ»§n{Tx/J2UWe2Vua
-Q&OG`1z-NP1b2?0
ÎÒ
¸Ò¿Ï¶¨ÎÊÌâ³öÔÚ²éѯÓï¾äÉÏÁ˺ó£¬ÎÒ¾ÍÖ±½Óµ½mysql-frontÉÏÈ¥×ö¸ö²éѯ²âÊÔ£¬ÔÚÕâ¸ö°ÙÍòÌõ¼Ç¼ÀïÈ¥²éѯһÌõ·ûºÏÌõ¼þµÄ¼Ç¼ÊÔÊÔ¡£½á¹û²»³öËùÁÏ£¬²é
ѯ½á¹ûÊÇÒ»Ìõ¼Ç¼£¬È´»¨ÁË4.76Ãëʱ¼ä¡£ÎÒÐÄÏ룺²»ÊÇ°É£¬Õâ¾ÍÊÇ´«ËµÖеĿìËÙ²éѯµÄMYSQL£¿£¿ÎÒ¿ªÊ¼»ØÒäÁË£¬ÒÔÇ°¿´ÊéµÄʱºòMYSQLÓÅ»¯µÈÄÚÈÝ¡£
ͻȻÏëµ½Ë÷Òý£¿Á¢¿ÌΪһ¸ö¾­³£ÐèÒªwhereµÄ×ֶν¨Á¢ÁËÒ»¸öË÷Òý£¬È»ºóͬÑùµÄSQLÓï¾äÔÙ×ö²âÊÔ£¬Õâ´Î½öÖ»»¨ÁË0.04Ãë¡£¶ÙʱͷÄÔÇåÐÑÁËÒ


Ïà¹ØÎĵµ£º

MySql»ù´¡ÖªÊ¶(¾­µä°æ)

 
Ò»¡¢mysql µÄ¹ÜÀí
1
¡¢Á¬½Ó
Mysql
¸ñʽ£º mysql -hÖ÷»úµØÖ· -uÓû§Ãû £­pÓû§ÃÜÂë
Àý1£ºÁ¬½Óµ½±¾»úÉϵÄMYSQL¡£
Ê×ÏÈÔÚ´ò¿ªDOS´°¿Ú£¬È»ºó½øÈëĿ¼ mysqlbin£¬ÔÙ¼üÈëÃüÁîmysql -uroot -p£¬»Ø³µºóÌáʾÄãÊäÃÜÂ룬Èç¹û¸Õ°²×°ºÃMYSQL£¬³¬¼¶Óû§rootÊÇûÓÐÃÜÂëµÄ£¬¹ÊÖ±½Ó»Ø³µ¼´¿É½øÈëµ½MYSQLÖÐÁË£¬MYSQLµÄÌáʾ·ûÊÇ£º ......

MySql ¸ñʽ»¯Ê±¼äº¯Êý

 ÕâÀïÊÇÒ»¸öʹÓÃÈÕÆÚº¯ÊýµÄÀý×Ó¡£ÏÂÃæµÄ²éѯѡÔñÁËËùÓмǼ£¬Æädate_colµÄÖµÊÇÔÚ×îºó30ÌìÒÔÄÚ£º
mysql> SELECT something from table
WHERE TO_DAYS(NOW()) - TO_DAYS(date_col) <= 30;
DAYOFWEEK(date)
·µ»ØÈÕÆÚdateµÄÐÇÆÚË÷Òý(1=ÐÇÆÚÌ죬2=ÐÇÆÚÒ», ……7=ÐÇÆÚÁù)¡£ÕâЩË÷ÒýÖµ¶ÔÓ¦ÓÚODBC±ê ......

LinuxÖв鿴ºÍÉèÖÃMySQLÊý¾Ý¿â×Ö·û¼¯(ת)

6
¡¢ÐÞ¸ÄÊý¾Ý¿âµÄ×Ö·û¼¯
mysql>use mydb
mysql>alter database mydb character set utf-8;
 
6
¡¢´´½¨Êý¾Ý¿âÖ¸¶¨Êý¾Ý¿âµÄ×Ö·û¼¯
mysql>create database mydb character set utf-8;
ͨ¹ýÅäÖÃÎļþÉèÖô´½¨Êý¾Ý¿âʱ×Ö·û¼¯:
#vi /var/lib/mysql/mydb/db.opt
default-character-set=latin1
default-col ......

mysql ÖÐshow ÃüÁîÓ÷¨Ïêϸ½éÉÜ

 ÒÔÏÂËùÓÐÃüÁÊÇÔÚ½øÈëmysql¼à¿ØÆ÷ÖÐÖ´Ðеģº
  a. show tables»òshow tables from database_name; // ÏÔʾµ±Ç°Êý¾Ý¿âÖÐËùÓбíµÄÃû³Æ
  b. show databases; // ÏÔʾmysqlÖÐËùÓÐÊý¾Ý¿âµÄÃû³Æ
  c. show columns from table_name from database_name; »òshow columns from databa ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ