dbTalk Databases Forums  

mySQL question

comp.databases comp.databases


Discuss mySQL question in the comp.databases forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dave
 
Posts: n/a

Default 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.



Reply With Quote
  #2  
Old   
Dave
 
Posts: n/a

Default Re: mySQL question - 08-05-2003 , 02:34 PM






It's working now....



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.