Hello guys,
Anyone here know how to insert and update record using simple prepared statement command (i'm using mysql). To insert record in
jsp webform. I know there's other way, but it looks bit complicated to me (
servlet,javabean,etc). The example code something similar down here :
<%
Class.forName("com.mysql.jdbc.Driver");
Connection Conn = DriverManager.getConnection("jdbc:mysql://localhost:3307/test","root","bbb213");
Statement Stmt = Conn.createStatement();
ResultSet resultset= Stmt.executeQuery
("SELECT * FROM student" WHERE StudID="?);
%>
<BR><table width="500" border="1" align="center" bgcolor="#99CCCC">
<tr bgcolor="#FFFFCC">
<td width="165"><strong>Student Info</strong></td>
<td width="8"> </td>
<td width="310"> </td>
</tr>
<tr>
<td>Student Name:</td>
<td>:</td>
</tr>
<tr>
<td>Student ID:</td>
<td>:</td>
</tr>
Pls, i need a simple jsp that can insert and update record properly.Thanks in advance.