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();}
Lineage II Classic Einhovant new project is looking for a skilled Java Developer to join our team!
If you're passionate about game development and eager to contribute to this project, we'd love to hear from you.
For more details, feel free to send us a message. Let’s create something amazing together!
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