<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %> Learn Ayurveda-Oils and Products

Oils and Products

<%! 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(); } } %>