mySQL question -
08-05-2003
, 01:30 AM
Hi, I have a n00b question...
I need to know how to change an entry in a mySQL table from a .jsp file...
I have used a form to send the data I need to another page where I am using
request.getParameter("data") to put the data into the command to update the
database - but I have no idea what command to use to do this. (I have three
things that I am trying to change). The page will then redirect to another
page that tells the user that the data uploaded successfully.
This is what I have come up with so far:
String input = "insert into "+request.getParameter("table")+"(Price, CSpec,
Vis) values("+p+","+c+","+v+") where ID="+i;
updateStatement.executeUpdate(input);
I think that the problems lies in the fact that I am using a Statement....
Anyway, any assistance will be most appreciated.
Thanks in advance,
Dave. |