-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuy12
73 lines (61 loc) · 1.77 KB
/
buy12
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<font color=green size=+6><b>Welcome to Instant buy<br>Just click on Item you like</font>
<%@ page import="java.sql.*"%>
<%
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection c1=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","yogesh");
String x1="select * from items1";
PreparedStatement st=c1.prepareStatement(x1);
ResultSet rs=st.executeQuery();
out.println("<table border=1 bgcolor=skyblue>");
out.println("<tr>");
out.println("<td>");
out.println("ItemNo");
out.println("</td>");
out.println("<td>");
out.println("ItemName");
out.println("</td>");
out.println("<td>");
out.println("Category");
out.println("</td>");
out.println("<td>");
out.println("SubCategory");
out.println("</td>");
out.println("<td>");
out.println("Description");
out.println("</td>");
out.println("<td>");
out.println("Price");
out.println("</td>");
out.println("<td>");
out.println("Image");
out.println("</td>");
//out.println("</tr>");
while(rs.next())
{
out.println("<br>");
out.println("<td onclick=boiy('"+rs.getString("no")+"')>");
out.println("ItemNo.="+rs.getString("no"));
out.println("<br>");
out.println("</td>");
out.println("<br>");
out.println("ItemName="+rs.getString("name"));
out.println("<br>");
out.println("Category="+rs.getString("category"));
out.println("<br>");
out.println("<font align=right>");
out.println("SubCategory="+rs.getString("sub_category"));
out.println("<br>");
out.println("</font>");
out.println("Description="+rs.getString("description"));
out.println("<br>");
out.println("Price is RS."+rs.getString("price"));
out.println("<br>");
out.println("<center>");
out.println("<img src='"+rs.getString("image")+".jpg'>");
out.println("<br>");
out.println("</center>");
}
rs.close();
c1.close();
%>
</table>