String strSql = "select * from article where id = "+ID;

解决方案 »

  1.   

    String strSql = "select * from article where id = "+ID;
      

  2.   

    String strSql = "select * from article where id = "+ID+"";

    String strSql = "select * from article where id = "+ID;
      

  3.   

    字符串才能用''
    int 不能用这个''
      

  4.   

    try
    {
      id_tmp = Integer.parseInt(id);
    }
    catch(Exception e)
    {
      id_tmp = 0;
    }
    String strSql = "select * from article where id = "+id_tmp;
      

  5.   

    String strSql = "select * from article where id = "+ID;
      

  6.   

    String strSql = "select * from article where id like '"+ID+"'";
      

  7.   

    String ID = (String) request.getParameter("id");
      

  8.   

    常识一下String strSql = "select * from article where id = "+ID+";
    要多尝试,多积累!
      

  9.   

    String strSql = "select * from article where id = "+String.valueOf(ID);