Hi
can any one of you tell me why i am unable to insert values into MYsql.
I wrote a
jsp page where i am trying to insert data through
Java bean into Mysql.
i am ableprint all fileds in jsp page but in mysql all the columns are Zero.
when i try to re enter the same valuse its giving me Duplicate error
'ERROR 1062 (23000): Duplicate entry '0' for key 2'
the code in Bean is following
String sqlstmt="insert into user_details(fname,lname,uname,pwd,rpwd,age,email,remail,phone,mobile,addr) values(fname='"+fname+"',lname='"+lname+"',uname='"+uname+"',pwd='"+pwd+"',rpwd='"+rpwd+"',age="+age+",email='"+email+"',remail='"+remail+"',phone="+phone+",mobile="+mobile+",addr='"+addr+"')";
System.out.println(sqlstmt);
int i=st.executeUpdate(sqlstmt);
can any body please help me on the same.