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

Á¬½ÓmysqlµÄjavabeanʵÀý+¼òµ¥·ÖÒ³

<%@ page contentType="text/html;charset=GBK" language="java" import="java.sql.*,java.util.*"%>
<html>
<head>
<title>Á¬½ÓmysqlµÄjavabeanʵÀý+¼òµ¥·ÖÒ³</title>
<link href="../CSS.css" rel="stylesheet" type="text/css">
</head>
<body>
<jsp:useBean id="mypage" class="ckstudio.db.mysqlconn" scope="page"/>
<table width="1024"><tr>
<td>rs.getString(user_id)</td>
<td>rs.getString(user_name)</td>
<td>rs.getString(user_mail)</td>
<td>rs.getString(user_adds)</td>
</tr>
<br>
<tr>
<td style="hight:8px:width:%25;background-color:red;">
<td style="hight:8px:width:%25;background-color:red;">
<td style="hight:8px:width:%25;background-color:red;">
<td style="hight:8px:width:%25;background-color:red;">
</tr>
<%!
 int Cint(String cint)
   {
    try {
   int n;
      n= Integer.parseInt(cint);
   return n;
        }
       catch (NumberFormatException e) {
                 return 0;
        }
}
%>
<%
int PageSize=5; //ÉèÖÃÿҳÏÔʾµÄ¼Ç¼ÌõÊý
int ShowPage=1; //ÉèÖÃÏëÒªÏÔʾµÄÒ³Êý
int RowCount = 0; //ResultSetµÄ¼Ç¼ÊýÄ¿ ³õʼֵ
int PageCount = 0; //ResultSet·ÖÒ³ºóµÄ×ÜÒ³Êý ³õʼֵ
int duoyu=0; //ÉèÖ÷ÖÒ³×îºóÒ»Ò³µÄ¼Ç¼Êý ³õʼֵ
//ÒÔÉÏÊǶÔÕâЩÊý¾ÝµÄ³õʼ»¯ pagesize¿É×ÔÐÐÉèÖÃ
String sql="select * from member order by user_id desc";
    ResultSet rs=mypage.executeQuery(sql);
   //½¨Á¢ResultSet(½á¹û¼¯)¶ÔÏ󣬲¢Ö´ÐÐSQLÓï¾ä
%>
<%if(rs.next())

    rs.last(); //½«Ö¸±êÒÆÖÁ×îºóÒ»±Ê¼Ç¼
    RowCount=rs.getRow();
    duoyu=RowCount % PageSize;
  &nbs


Ïà¹ØÎĵµ£º

MySQL5.1ÄÚ±íתµ½MS SQL£¬±í½á¹¹Ó¦ÈçºÎÉèÖã¿

# MySQL-Front 5.1  (Build 4.2)
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE */;
/*!40101 SET SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES */;
/*!40103 SET SQL_NOTES='ON' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS */ ......

mysqlÕýÔò±í´ïʽ LIKE ͨÅä·û

ÓÉMySQLÌṩµÄģʽƥÅäµÄÆäËûÀàÐÍÊÇʹÓÃÀ©Õ¹ÕýÔò±í´ïʽ¡£µ±Äã¶ÔÕâÀàģʽ½øÐÐÆ¥Åä²âÊÔʱ£¬Ê¹ÓÃREGEXPºÍNOT REGEXP²Ù×÷·û(»òRLIKEºÍNOT RLIKE£¬ËüÃÇÊÇͬÒå´Ê)¡£ À©Õ¹ÕýÔò±í´ïʽµÄһЩ×Ö·ûÊÇ£º
“.”Æ¥ÅäÈκε¥¸öµÄ×Ö·û¡£
Ò»¸ö×Ö·ûÀà“[...]”Æ¥ÅäÔÚ·½À¨ºÅÄÚµÄÈκÎ×Ö·û¡£ÀýÈ磬“[abc]”ƥŠ......

Mysql Explain Ïê½â

Òý×Ô http://www.itpub.net/thread-1034410-1-1.html
Mysql Explain Ïê½â
Ò».Óï·¨
explain < table_name >
ÀýÈç: explain select * from t3 where id=3952602;
¶þ.explainÊä³ö½âÊÍ
+----+-------------+-------+-------+-------------------+---------+---------+-------+------+-------+
| id | select_type ......

Mysql°²×°ÅäÖÃ

ϵͳ»·¾³£ºrhel5 (×îС»¯°²×°£¬Ö»°²×°vi¹¤¾ß) Äںˣº2.6.18-8.el5 1¡¢ ÏÂÔرàÒë°²×° #cd /usr/local/src/tarbag #wget http://mysql.byungsoo.net/Downloads/MySQL-5.1/mysql-5.1.38.tar.gz //ÏÂÔØ5.1.38 #tar xzvf mysql-5.1.38.tar.gz -C ../software/ #cd ../software/mysql-5.1.38 #./configure --prefix=/usr ......

OracleÓëMySQLÖС°¿É´®Ðл¯¡±µÄ¶Ô±È²âÊÔ

OracleÓëMySQLÖГ¿É´®Ðл¯”µÄ¶Ô±È²âÊÔ
      Thomas Kyte ÔÚ“Oracle 9i&10g±à³ÌÒÕÊõ”Ò»ÊéÖÐΪÁË˵Ã÷ÊÂÎñµÄ¸ôÀ뼶±ð£¬ÌṩÁËһЩÀý×Ó¡£ÕâÀïÎÒÃÇÀ´¿´¿´“¿É´®Ðл¯”¼¶±ðϵıíÏÖ¡£
ÒÔÆÕͨÓû§µÇ¼ϵͳ£¬²¢´´½¨²âÊÔÓÃµÄ±í¡£
idle> connect scott/tiger ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ