I have created a database table with 4 columns
user , password , ipaddress , isVIP
I would like to insert the data to ipaddress where user = ? and password =?
I tried using this mySQL syntax
PreparedStatement ps = con.prepareStatement("INSERT INTO login(ipaddress) VALUES(?) select * from login where user=? and password=?");
ps.setString(1,ipaddress);
ps.setString(2,id);
ps.setString(3, password);
Which it tells me that I have syntax error.