Currently this is my code to update my sql, and I'm getting a syntax error. the carid is being passed in from the front end. Can anyone assist me with fixing the syntax.

```
String carid = req.getParameter("id");

int rs;
Connection conn = null;
java.sql.PreparedStatement st= null;
String nativeSQL = "";

try {
    Context    ctx = new InitialContext();
    Context env = ( Context )ctx.lookup( "java:comp/env" );
    DataSource ds = ( DataSource )env.lookup( "jdbc/carRentalSystem");
    conn = ds.getConnection();

    st = conn.prepareStatement("update cardetails SET Availability = Unavailable where id='"+ carid+ "'");
    st.clearParameters();
    rs= st.executeUpdate();
            if(rs != 0) {
                res.sendRedirect("carRental.jsp");
                return;
            }else {

            }
    }
    catch(Exception e) {
        e.printStackTrace();
        }
    finally {
        try{ if(st != null ) st.close(); } catch(java.sql.SQLException e){}
        try{ if(conn != null ) conn.close(); } catch(java.sql.SQLException e){}

    }
}

```