<body>
<% String name=session.getAttribute("user").toString(); %>
<br>
<%@ page import="java.sql.*" %>
<%
try
{
Class.forName("com.mysql.jdbc.Driver").newInstance();
java.sql.Connection
con=DriverManager.getConnection
("jdbc:mysql://localhost:3306/pbl","root","");
Statement st=con.createStatement();
String q="select pcode ,pname,pprice from car where us="+name;
ResultSet rs = st.executeQuery(q) ;
%>
error: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'by name' at line 1