In my Web Application, i have a data table(Displayed from DB using PreparedStatement). Each row have an edit button. A form is situated below the table. If i click edit button, the data from the row will be filled into the form. So, that i can edit and save it.
Or, i can enter new data in the form and a add new row. The issue is the "Save" button. Update & Insert needs different queries.
SO, i want to call two different methods. Any idea regarding this issue.
Addtional informations: The web page was built using HTML & Java Script. Java used in back end to connect DB and get Data.
Thanks.