Looking for some kind help on this ! i am in puting Fluffy in the text field created in thw shopping cart.And the output resultis giving me: Fluffy Fluffy
Am I making some big mistake or is it sql query spaces ! Please help !
<html>
<body>
<%
Class.forName("org.gjt.mm.mysql.Driver".newInstance();
connection = DriverManager.getConnection(connectionURL, "root", "samans"
statement = connection.createStatement();
out.println("<b>" + request.getParameter("tex" + "</b>"
String nam = (request.getParameter("tex");
out.println("<b>" + nam + "</b>"
rs = statement.executeQuery(
" select * "
+ " from pet "
+ " where name = ' " + nam + " ' "
while (rs.next()) {
out.println(rs.getString("nam");
}
rs.close();
%>
</body>
</html>
Am I making some big mistake or is it sql query spaces ! Please help !
<html>
<body>
<%
Class.forName("org.gjt.mm.mysql.Driver".newInstance();
connection = DriverManager.getConnection(connectionURL, "root", "samans"
statement = connection.createStatement();
out.println("<b>" + request.getParameter("tex" + "</b>"
String nam = (request.getParameter("tex");
out.println("<b>" + nam + "</b>"
rs = statement.executeQuery(
" select * "
+ " from pet "
+ " where name = ' " + nam + " ' "
while (rs.next()) {
out.println(rs.getString("nam");
}
rs.close();
%>
</body>
</html>