title: Parameter index out of range (8 > number of parameters, which is 7)
body: <p>I have this database table:</p>
  
  <pre><code>create table users(
      id int not null auto_increment,
      fn varchar(30),
      ln varchar(30),
      sex char,
      email varchar(60),
      country varchar(40),
      username varchar(30),
      password varchar(100),
      primary key(id)
  );
  </code></pre>
  
  <p>When I run this code, I am getting an error: Parameter index out of range (8 > number of parameters, which is 7). I also tried changing <code>setString(1,fn)</code> but it's not working.</p>
  
  <pre><code> try{
       String INSERT="INSERT INTO users (fn,ln,,sex,email,country,username,password) VALUES (?,?,?,?,?,?,?)";
       PreparedStatement pst=conn.prepareStatement(INSERT);
       System.out.println("Created prepared statement");
  
       pst.setString(2,"fn");
       pst.setString(3,"ln");
       pst.setString(4,"sex");
       pst.setString(5,"email");
       pst.setString(6,"country");
       pst.setString(7,"username");
       pst.setString(8,"password)");
       pst.executeUpdate();
   }
  </code></pre>