mysqlµÄ±È½ÏÔËËã
ÔÚmenzhi007µÄblogÀï¿´µ½·Ç³£ÓÐÒâ˼µÄ¶«Î÷£ºhttp://hi.baidu.com/menzhi007/blog/item/c2e98551a18754848c54301c.html
ÔÚmysqlÊÖ²áÀ
http://www.phpchina.com/manual/mysql/functions.html#comparison-operators
MySQL°´ÕÕÒÔϹæÔò½øÐÐÊýÖµ±È½Ï£º
ÈôÓÐÒ»¸ö»òÁ½¸ö²ÎÊýΪ NULL£¬³ý·ÇNULL-safe <=> µÈËã·û£¬Ôò±È½ÏÔËËãµÄ½á¹ûΪNULL¡£
Èôͬһ¸ö±È½ÏÔËËãÖеÄÁ½¸ö²ÎÊý¶¼ÊÇ×Ö·û´®£¬Ôò°´ÕÕ×Ö·û´®½øÐбȽϡ£
ÈôÁ½¸ö²ÎÊý¾ùΪÕûÊý£¬Ôò°´ÕÕÕûÊý½øÐбȽϡ£
Ê®Áù½øÖÆÖµÔÚ²»ÐèÒª×÷ΪÊý×Ö½øÐбȽÏʱ£¬Ôò°´ÕÕ¶þ½øÖÆ×Ö·û´®½øÐд¦Àí¡£
¼ÙÈç²ÎÊýÖеÄÒ»¸öΪ TIMESTAMP »ò DATETIME ÁУ¬¶øÆäËü²ÎÊý¾ùΪ³£Êý£¬ ÔòÔÚ½øÐбȽÏÇ°½«³£ÊýתΪ timestamp¡£ÕâÑù×öµÄÄ¿µÄÊÇΪÁËʹODBCµÄ½øÐиü¼Ó˳Àû¡£ ×¢Ò⣬Õâ²»ÊʺÏIN()ÖеIJÎÊý!ΪÁ˸ü¼Ó¿É¿¿£¬ÔÚ½øÐжԱÈʱͨ³£Ê¹ÓÃÍêÕûµÄ datetime/date/time×Ö·û´®¡£
ÔÚÆäËüÇé¿öÏ£¬²ÎÊý×÷Ϊ¸¡µãÊý½øÐбȽϡ£
ÔÚĬÈÏ״̬Ï£¬×Ö·û´®±È½Ï²»Çø·Ö´óСд£¬²¢Ê¹ÓÃÏÖÓÐ×Ö·û¼¯(ĬÈÏΪcp1252 Latin1£¬Í¬Ê±¶ÔÓ¢ÓïÒ²ÊʺÏ)¡£
ΪÁ˽øÐбȽϣ¬¿ÉʹÓÃCAST()º¯Êý½«Ä³¸öֵתΪÁíÍâÒ»ÖÖÀàÐÍ¡£ ʹÓÃCONVERT()½«×Ö·û´®Öµ×ªÎª²»Í¬µÄ×Ö·û¼¯¡£Çë²Î¼û12.8½Ú£¬“Castº¯ÊýºÍ²Ù×÷·û”¡£
ÒÔÏÂÀý×Ó˵Ã÷Á˱ȽÏÔËËãÖн«×Ö·û´®×ªÎªÊý×ֵĹý³Ì£º
mysql> SELECT 1 > '6x';
-> 0
mysql> SELECT 7 > '6x';
-> 1
mysql> SELECT 0 > 'x6';
-> 0
mysql> SELECT 0 = 'x6';
-> 1
Õâ¸öÈç¹û²»×¢ÒâºÃȷʵ¿ÉÒÔµ¼Ö°²È«ÎÊÌâµÄ£¬±ÈÈçmenzhi007Àï¾ÙµÄÄǸöÁÐ×Ó£¬Èç¹û×Ö·û±äÁ¿²éѯûÓÐÒýºÅ£¬µ«ÊÇÓÃijЩº¯Êý¹ýÂËÁ˲»¿ÉÒÔÖ±½Ó×¢É䣬ÄÇô¿ÉÒÔÖ±½ÓÌá½»0¾Í¿ÉÒÔÈƹýÁË...
×îºó¸Ðлmenzhi007¼°hiȺµÄ¸÷´óÅ£µÄÌÖÂÛ£¬ÓÈÆäÊÇryatÅ£µÄÖ¸µã£º£©
Ïà¹ØÎĵµ£º
°²×°»·¾³£ºVMware Workstation 5.5.0 build-18463
Linux°æ±¾£ºRed Hat Enterprise Linux AS (2.6.9-42.EL)
Èí¼þ°æ±¾£ºMySQL5 - mysql-5.0.37.tar.gz
¡¡¡¡¡¡¡¡¡¡Apache2 - httpd-2.2.4.tar.gz
¡¡¡¡¡¡¡¡¡¡PHP5 - php-5.2.1.tar.gz
¡¡¡¡¡¡¡¡¡¡(½«ÒÔÉÏÎļþ±£´æÖÁ/home/tmpĿ¼)
[MySQL]
# cd /home/tmp (½øÈëѹËõ°ü ......
fedora8 ÓÃyumÀ´¹ÜÀí°²×°Apache+PHP+MysqlµÄ»ù±¾°²×°¡£
1. °²×°Apahce, PHP, Mysql, ÒÔ¼°phpÁ¬½Ómysql¿â×é¼þ¡£
yum -y install httpd php mysql mysql-server php-mysql
2. ÅäÖÿª»úÆô¶¯·þÎñ
/sbin/chkconfig httpd on [ÉèÖÃapache·þÎñÆ÷httpd·þÎñ¿ª»úÆô¶¯]
......
The MySQL 5.0 Archive Storage Engine
http://dev.mysql.com/tech-resources/articles/storage-engine.html
Ìص㣺
1.²»Ö§³ÖÈκÎË÷Òý£¬µ«Ê¹Óòéѯ»º´æ
2.¸ù¾Ýmysql¹¤³ÌʦµÄ˵·¨£¬µ±±í´óС´ïµ½1.5Gʱ£¬±íɨÃèarchiveʱ¼äÉÙÓÚmyisam±í
3.Èç¹ûÄãÏë¸Ä±äÆäËû´æ´¢ÒýÇæµÄ±íµ½archiveÒýÇ棬ÇëÏÈdropÏÂÈκÎË÷Òý
4.myisam¿ÉÒÔÓ ......