Tag:Mixed use

  • Examples of mixed use of JSP and SQL statements

    Time:2020-10-22

    If you don’t say much, just give me an exampleinsert Copy codeThe code is as follows: String sql=”insert into allorder values(‘” + orderid + “‘,’” + bookid +”‘,’” + amount + “‘,’” + username + “‘)”; int result=stmt.executeUpdate(sql); if(result==1) response.sendRedirect(“index.jsp”); else response.sendRedirect(“detail.jsp”); delete Copy codeThe code is as follows: String condition=”delete from allorder where id=’”+ […]