<%!
Connection con=null;
Statement st=null,st1=null;
ResultSet rs=null;
String message="";
String pname="",price="";
%>
<%
try{
con=log.getConnection();
if(con!=null){
st=con.createStatement();
rs=st.executeQuery("select oil_products.product_name,oil_products.price,oil_products.weight,oil_products.description,image_table.img from oil_products,image_table where oil_products.product_name=image_table.product_name");
while(rs.next()){
pname=rs.getString("product_name");
price=rs.getString("price");
%>
<%=pname%> (Weight:<%=rs.getString("weight")%>ml) |
|
Price-<%=price%> |
<%out.println(rs.getString("description"));%>
|
" width="150" height="150"> |
|
|
<%}
}%>
<%}
catch(Exception e){
out.println(e);
message="Failed to do operation.Error is "+e.getMessage();
}
finally{
if(con!=null && !con.isClosed()){
con.close();
}
}
%>