MySQL±àÂëµÄÎÊÌâ
ÎÒµÄMySQL±àÂ룬ÎÒÔÚmy.iniÖÐÉèÖõÄΪutf8,ÔÚ´´½¨Êý¾Ý¿âʱѡÔñµÄ±àÂëΪutf8_Unicode_ci£¬ÎÒÔÚ¡¢´ÓÒ³Ãæ²åÈëÊý¾Ý¿â£¬ÔÚÒ³ÃæÉÏÏÔʾÕý³££¬µ«´ÓphpmyadminÖУ¬²é¿´Ê±£¬ÏÔʾΪÂÒÂ루ÎÒÎÒ¡£¡£¡££©ÀàËÆÓÚÕâÑùµÄÂÒÂ룬´ÓphpmyadminÖУ¬²åÈëÊý¾Ýʱ£¬´ÓÒ³ÃæÉϲ鿴£¬ÏÔʾΪÂÒÂ루£¿£¿£¿£¿£©ÀàËÆÓÚÕâÑùµÄÂÒÂ룬ÎÒµÄÍøÒ³ÖУ¬Ö±½ÓÌí¼ÓµÄform±íµ¥£¬Ã»¼ÓÈë <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />±àÂë˵Ã÷£¬ÔÚÒÔǰûÎÊÌâµÄ£¬½ñÌìÉÏÀ´¾Í³öÎÊÌâÁË¡£¡£¡£
¸÷λ´óÏÀ£¬¸æËßÏÂÔÒò¡£¡£¡£
ÉèÖÃÒ»ÏÂphpmyadminµÄ±àÂëÓ¦¸Ã¾Í¿ÉÒÔÁË,Ê×Ò³×óÉϽÇÓиöLanguageµÄµ¥Ñ¡¿ò,Ñ¡Ôñ
ÖÐÎÄ-Chinese simplified
ÎÒÉèÖõľÍÊÇÖÐÎÄ-Chinese simplified
ÔÚÍøÒ³Ö´ÐвåÈëÊý¾Ý֮ǰ²åÈëÕâ¾ä´úÂ룺
mysql_query("set names utf8");
ÐÂÊÖ£¬¿´¿´£¡
ÎÒÉèÖÃmysql_query("set names utf8");
ÔõôÌáʾ´íÎó
ÎҵĴúÂëPHP code:
<?php
function db_connect()
{
$db = @ new mysqli("127.0.0.1","root","","wangliuwei");
mysqli_query("set names 'gbk'");
if (mysqli_connect_errno())
{
echo "Êý¾Ý¿âÁ¬½Óʧ°Ü";
echo mysqli_connect_error();
exit;
}
return $db;
}
?>
¸÷λ´óÏÀÃÇ£¬¸æËßÏ°ɡ£¡£¡£
ÔõôûÈ˻ش𣿣¿£¿£¿
×Ô¼º¶¥ÏÂ
ÄãÊý¾Ý¿â my.in
Ïà¹ØÎÊ´ð£º
°´µÀÀíÀ´Ëµ£¬Í¼Æ¬ÊÇÓ¦¸Ã°´ÕÕ·¾¶´æÔÚÊý¾Ý±íÖеģ¬ÓÉÓÚ¹¤×÷ÐèÒª£¬ÐèÒª½«Í¼Æ¬ÒÔ¶þ½øÖÆÁ÷µÄÇé¿ö´æÈëÊý¾Ý¿â£¬ÏÖÔÚ½«Êý¾Ý±ítableÖÐÒ»¸ö×Ö¶Îpicture£¬ÀàÐ͸ÄΪ longblob£¬ÒѾÄܳɹ¦½«¶þ½øÖÆÁ÷дÈë¸Ã×ֶΣ¬¿ÉÊÇÎÒÐèÒª½«¸ÃÍ ......
ÎÒµÄtomcat6.0.20 jdbcÇý¶¯ÊÇ5.1µÄ Ç°´ÎÎÒÕÕ×ÅÍøÉϵÄÅäÖþͿÉÒÔÁË Ò²²»ÓÃŪʲô»·¾³±äÁ¿ Õâ´Î¾Í²»ÐÐÁË ÎÒŪÁË»·¾³±äÁ¿Ò²²»ÐÐ tomcatÏÂÃæûÓÐcomm ËùÒÔÎÒ°Ñmysql-connector-java-5.1.8-bin.jar·Åµ½D:\Tomcat 6. ......
ÓÃjsp×ö¶«Î÷¸øÍêÈ«²»¶®mysqlµÄÈËÓ㬿ÉÊDZ¸·ÝʱֻÓпÕÎļþ£¬ÕâÊÇʲôÇé¿ö£¬
×îºÃÓÐÔ´´úÂ룬лл
Æäʵ±¸·ÝµÄ¹ý³ÌÎÒÏë´ó¸ÅÊÇÕâÑùµÄ£º
½«±íAÖеÄÊý¾Ý·Åµ½ArrayListÖУ¬È»ºó½«Õâ¸öArrayListÖеÄÊý¾ÝÔÙ´æµ½±íBÖС£ ......
linuxÉϵÄmysql·þÎñÔÚ½Ú¼ÙÈÕͻȻµ±µô
ÏÖÔÚÕÒÔÒò£¬»³ÒÉÊÇ´ÅÅ̿ռ䲻¹»£¬ÏÖÔÚÐèÒªÕÒµ½È·ÔäµÄÖ¤¾Ý¡£
£±¡¡¾ßÌåÔÚÄĸöÎļþÏ¿ÉÒÔÕÒµ½£¬Ëûµ±µôµÄ¾ßÌåʱ¼äºÍÔÒò£¿
£²¡¡windowsÏÂcÅÌ¿ÉÒÔ±¨´ÅÅ̿ռ䲻¹»µÄÔÒò£¬²» ......
select time from table
time
2009-09-12 12
2009-09-12 13
2009-09-12 14
2009-09-12 15
Ôõô½« ²éѯµÄÊý¾Ý±äΪ
time
2009-09-12 12ʱ
2009-09-12 13ʱ
2009-09-12 14ʱ
......