I have just one question regarding core side and using the SQL statements to update/insert datas into the database.
How could i implement the following query when a new character is created?
("UPDATE characters SET botprev_fail_account = (SELECT botprev_fail_account FROM accounts WHERE account_name=login")
I want that the new character that's created on the same account to have the botprev_fail_account value taken from the ACCOUNTS table and inserted into botprev_fail_account from CHARACTERS table.
The account_name and login have the same value.
The following code that i tried doesn't work:
try(Connection con2 =DatabaseFactory.getConnection()){PreparedStatement statement2 = con2.prepareStatement("UPDATE characters SET botprev_fail_account = (SELECT botprev_fail_account FROM accounts WHERE account_name=?");
statement2.setString(1, _accountName);
statement2.executeUpdate();
statement2.close();}
DISCORD :
utchiha_market
telegram :
https://t.me/utchiha_market
SELLIX STORE :
https://utchihamkt.mysellix.io/
Join our server for more products :
https://discord.gg/hood-services
https://campsite.bio/utchihaamkt
Question
stalker66
Hi guys.
I have just one question regarding core side and using the SQL statements to update/insert datas into the database.
How could i implement the following query when a new character is created?
I want that the new character that's created on the same account to have the botprev_fail_account value taken from the ACCOUNTS table and inserted into botprev_fail_account from CHARACTERS table.
The account_name and login have the same value.
The following code that i tried doesn't work:
3 answers to this question
Recommended Posts