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

mysql ²éѯÖÐË÷ÒýµÄ¹ÖÎÊÌâ

SQL code:
explain select * from t_user where username like '%ÅÖ';

½á¹û:
+----+-------------+--------+-------+---------------+------------+---------+------+------+-----------------------
| id | select_type | table  | type  | possible_keys | key        | key_len | ref  | rows | Extra
           
+----+-------------+--------+-------+---------------+------------+---------+------+------+-----------------------
|  1 | SIMPLE      | t_user | index | NULL          | ind_second | 62      | NULL |    5 | Using where; Using

index |

possible_keys ÊÇ¿ÉÓõÄË÷Òý£¬key ÊÇÓõ½µÄË÷Òý
possible_keys Ϊnull ,key ¾Í²»¿ÉÄÜÓÐֵѽ

ÕâÊÇÄÄÀï³öÎÊÌâÁË£¿
show index from t_user;
show create table t_user;

Ìù³öÀ´¿´Ò»Ï¡£

ÒýÓÃ
show index from t_user;
show create table t_user;

Ìù³öÀ´¿´Ò»Ï¡£

½á¹û·Ö±ðÊÇÕâÑùµÄ£º
CREATE TABLE `t_user` (
  `userid` int(11) NOT NULL AUTO_INCREMENT,
  `userName` varchar(20) NOT NULL,
  PRIMARY KEY (`userid`),
  KEY `ind_second` (`userName`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=


Ïà¹ØÎÊ´ð£º

mysqlµÄÁ¬½Ó³¬Ê±Ê±¼äÔõôÉèÖà - VC/MFC / Êý¾Ý¿â

ÎÒÊÇÓÃmysql×Ô´øµÄC API
if(mysql_real_connect(&mysql,"125.0.0.108","root","root","home",3306,NULL,0))

AfxMessageBox("Êý¾Ý¿âÁ¬½Óʧ°Ü") ......

MySQL´íÎó - PHP / »ù´¡±à³Ì

ÎÒ°²×°µÄÕâ¸öÈí¼þVertrigoServ£¬ÔÚwindows7ÖÐÔËÐУ¬Í¼±ê¼ÓºÅΪÀ¶É«£¬±¨MySQLµÄ´íÎó£¬Çë½Ì¸÷λ¸ßÊÖ¸ÃÔõÑù¸ü¸Ä¡£Ð»Ð»¸÷λ£¡
mysql ·þÎñÊÇ·ñÆðÀ´ÁË£¿

ûÓУ¬±¨µÄÊǶ˿ڴíÎó£¬ÔÚÅäÖÃÎļþµ±ÖиÄÁË£¬Ò²²»ÐÐ

¿ÉÒÔÓÃÈ ......

eclipseÁ¬½ÓmysqlÊý¾Ý¿â - Java / Eclipse

ÏÈÉÏ´íÎó
ÎÞ·¨Áª½ÓÊý¾Ý¿â
java.sql.SQLException: Before start of result set
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
at com.mysql.jdbc.ResultSet.checkRowPos(ResultSet.java: ......

vc++ ÓÃmysql¹Ù·½ connector ³ö´í - VC/MFC / Êý¾Ý¿â

try
{
sql::Driver *driver;
sql::Connection *con;
//´´½¨Á¬½Ó
driver = get_driver_instance();
con = driver->connect("tcp://192.168.18.52:3306", "root", "1234 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ