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Å£µÄÖ¸µã£º£©
Ïà¹ØÎĵµ£º
zz linux yum°²×°mysqlºóҪעÒâµÄһЩ³õʼ»¯ÎÊÌâ
ÎҵķþÎñÆ÷×°µÄÊÇcentos 5.3,ÓÉÓÚ×ʼ°²×°×öÁËÏêϸµÄ¼Ç¼,ËùÒÔÕû¸ö¹ý³ÌÒ²ÊÇÇá³µÊì·,һ·yumÏÂÀ´£¬¾Í¸ã¶¨ÁË£¬È»ºó¾ÍÊÇÊý¾Ý¿â¡¢ÍøÕ¾µÄ°á¼Ò£¬ÇáËɸ㶨~
¿ÉÊǽñÌìÔÚ¼Ò¿´ÁËϹ«Ë¾µÄÍøÕ¾£¬ÎÊÌâ³öÀ´ÁË~ ÓÐЩ²úÆ·µã»÷²é¿´ÏêϸÐÅÏ¢µÄʱºò£¬ÕÒ²»µ½ÍøÒ³~¾¹ýÒ»·¬Ë¼¿¼£¬·¢ÏÖÊÇmysql ......
MySQL 5.0 ÒÔÉÏÖ§³Ö´æ´¢¹ý³Ì¡£
PHP 5.0 ÒÔÉ쵀 mysqli ϵÁк¯Êý¿ÉÒÔÖ§³Ö²Ù×÷ MySQL µÄ´æ´¢¹ý³Ì¡£
ÒÔÏÂÊÇһЩ¼òµ¥µÄ´æ´¢¹ý³ÌºÍÓà PHP µ÷ÓõÄʾÀý¡£ Ò»¡¢·µ»Øµ¥¸öÊý¾Ý: 1: <?php
2: header("Content-Type:t ......
Ò»¡¢×ܽáһϣº
1.LinuxϵͳÏÂÆô¶¯MySQLµÄÃüÁ
mysqladmin start
/etc/init.d/mysql start (Ç°ÃæΪmysqlµÄ°²×°Â·¾¶)
2.linuxÏÂÖØÆômysqlµÄÃüÁ
mysqladmin restart
/etc/init.d/mysql restart (Ç°ÃæΪmysqlµÄ°²×°Â·¾¶)
3.linuxϹرÕmysqlµÄÃüÁ
mysqladmin shutdown
/etc/init.d/mysql shutd ......
ÔÚÈÕ³£µÄ¹¤×÷ÖУ¬±£»¤Êý¾ÝÃâÊÜδÊÚȨÓû§µÄÇÖ·¸ÊÇϵͳ¹ÜÀíÔ±Ìرð¹ØÐĵÄÎÊÌâ¡£Èç¹ûÄãÄ¿Ç°ÓõÄÊÇMySQL£¬¾Í¿ÉÒÔʹÓÃһЩ·½±ãµÄ¹¦ÄÜÀ´±£»¤ÏµÍ³£¬À´´ó´ó¼õÉÙ»úÃÜÊý¾Ý±»Î´ÊÚȨÓû§·ÃÎʵķçÏÕ¡£
ÆóÒµ×îÓмÛÖµµÄ×ʲúͨ³£ÊÇÆäÊý¾Ý¿âÖеĿͻ§»ò²úÆ·ÐÅÏ¢¡£Òò´Ë£¬ÔÚÕâЩÆóÒµÖУ¬Êý¾Ý¿â¹ÜÀíµÄÒ»¸öÖØÒª²¿·Ö¾ÍÊDZ£»¤ÕâЩÊý¾ÝÃâÊÜÍⲿ¹¥»÷£ ......