<%@ page import="java.io.*,java.util.*,java.sql.*"%>java
<%mysql
request.setCharacterEncoding("gb2312");sql
java.sql.Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/GPSDatabase","root","123456");spa
String sql1="SELECT top 2 * from jdjq order by id desc";orm
Statement statemenet = (Statement) conn.createStatement();get
ResultSet rs1 = statemenet.executeQuery(sql1);string
while(rs1.next()){it
%>io
<tr>class
<td width="12" height="81" valign="top"><!--DWLayoutEmptyCell--> </td>
<td width="158" valign="top" bgcolor="#999999" class="dh"><div align="center"><img src="file/<%=rs1.getString("image")%>" width="154" height="77"></div></td>
<td width="240" valign="top"><div align="left"><span class="style8"><%=rs1.getString("name")%></span><br>
<%-- <span class="style4"><%=substring(rs1.getString("message"),120)%></span> --%>
</div></td>
<td width="9" valign="top"><!--DWLayoutEmptyCell--> </td>
</tr>
<%
} rs1.close();
%>