I am creating a GUI bank project in netbeans that uses mysql database. I set the account numbers as primary key and I want the user to deposit money only if they put in their correct account number. When I tried to do this, only one row works, how do I make so that whenever the account number is entered and the amount for the deposit is entered, it will update the balance column. Here is my query statement:
String Query = "UPDATE ACCOUNTINFO SET BALANCE = '"+txtAmount.getText()+"'
WHERE ACCOUNTNUMBER = '"+txtAccountNum.getText()+"'";