Quote:
Originally Posted by cbk1994
Uhm, you should not be storing the community name in the table at all unless you're using it in addition to the account. I hope you're keeping in mind that some players don't have community names, and that they can change. The account should be used as an internal identifier. There are already functions available for getting a community name from an account (DB_Names.getCommunityName or something like that iirc) that you should be using.
|
could use a JOIN operation to get community names in a single query. Assuming the table that stores updated accounts/community names is called 'accounts':
NPC Code:
SELECT bulletin_table.account[, other_rows_you_need], accounts.communityname FROM bulletin_table
LEFT JOIN accounts ON bulletin_table.account = accounts.account;
My SQLite is a bit rusty, but I'm pretty sure the syntax is correct and that it would work without explicitly defining any primary/foreign keys.