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

¼°ÆäÑÏÖØµÄmysqlÂÒÂë

Êý¾Ý¿âmysql5.0£º
character_set_client gbk;
character_set_connection gbk;
character_set_database gbk;
character_set_filesystem binary;
character_set_results gbk;
character_set_server gbk;
character_set_system utf8;
my.iniÎļþ£º
[client]

port=3306

[mysql]

default-character-set=GBK


# SERVER SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this
# file.
#
[mysqld]

# The TCP/IP Port the MySQL Server will listen on
port=3306
character_set_server =GBK

#Path to installation directory. All paths are usually resolved relative to this.
basedir="C:/Program Files/MySQL/MySQL Server 5.0/"

#Path to the database root
datadir="C:/Program Files/MySQL/MySQL Server 5.0/Data/"

# The default character set that will be used when a new schema or table is
# created and no character set is defined
default_character_set=GBK
Ò³ÃæÈ«²¿ÊÇ£º
<%@ page language="java" contentType="text/html; charset=GBK" pageEncoding="GBK"%>
struts.xml:
<constant name="struts.il8n.encodi


Ïà¹ØÎÊ´ð£º

ÎÒÒª°Ñ×¢²áÐÅÏ¢Ìá½»µ½mysqlÖУ¬ÒªÔõô°ìÄØ£¿

ÎÒÔÚ×¢²áÒ³ÃæÐ´ÈëÁËÈçÏ´úÂ룺
<?php
    $conn=mysql_connect("localhost","root","614510")or die("Êý¾Ý¿â·þÎñÆ÷Á¬½Ó´íÎó".mysql_error());
& ......

MYSQL Êý¾Ý½ØÈ¡

MYSQL ½ØÈ¡Ò»¸öÊý¾Ý±íÖÐ,ijһ¸ö×Ö¶Î(fulltext) µÄǰÈý°Ù¸ö×Ö·û,·Åµ½¸Ã±íÏÂÁíÒ»¸ö×Ö¶Î(introtxt)Àï.
ÇóʵÏÖÕâ¸öЧ¹ûµÄÃüÁî
SQL code:
update ±í set introtxt=left(`fulltext`,300);

¶¥£¬Ñ§Ï°

SQL code: ......

mysqlÉÏÏÞÎÊÌâ

  ÇëÎÊһϴó¼ÒÓÐûÓÐÈËÅäÖùýmysqlµÄiniµÄÅäÖÃÎļþ£¬ÏÖÔÚÎÒÓÐÒ»¸öÎÊÌâ¾ÍÊÇ.ÏÖÔÚ±íÖÐ35ÍòÌõµÄÊý¾Ý²éѯ³öÀ´ÊÇûÓÐÎÊÌâµÄ£¬µ«Êǵ±Êý¾Ý¿â´ïµ½°ÙÍòÒÔÉÏÊý¾Ý¾Í²éѯ²»³öÀ´ÁË£¬£¨Ç°ÌáÊÇͬÑùµÄÌõ¼þÀ´×öÕâÁ½´ÎÊý¾Ý²éѯ² ......

mysql like ÎÊÌâ

select * from table where '123456789' like '%'+×ֶαí+'%'


Õâ¾äsqlÔÚsqlserverÏÂͨ¹ý£¬ÔÚmysqlÏÂÓб¨´í£¬mysqlÏÂÈçºÎʵÏÖÕâÑùµÄ²éÑ¯ÄØ
SQL code:
select * from table whe ......

cÓïÑÔÈçºÎÁ¬½ÓMYSQL£¿

´ó¼ÒºÃ:
ÎÒÊǸãCµÄ, ÏÖÔÚÏëÓÃC Á¬½ÓMYSQL,µ«ÊÇÔõôҲÁ¬½Ó²»ÁË,ÎҵĴúÂëÈçÏÂ:
#include <stdio.h>
#include "C:\Program Files\MySQL\MySQL Server 5.0\include\mysql.h"
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ