Here's how I'm doing it on Maloria.
Table creation...
NPC Code:
CREATE TABLE items (entry_index INTEGER PRIMARY KEY AUTOINCREMENT, account VARCHAR NOT NULL DEFAULT 'ACCOUNT_ERROR', item_id VARCHAR NOT NULL DEFAULT 'ID_ERROR', item_data VARCHAR NOT NULL DEFAULT 'DATA_ERROR')
Loading of items...
NPC Code:
SELECT * FROM items WHERE account = '" @ player.account @ "'"
Then I just loop through the query and add each item to player.items which is a TStaticVar that gets cleared everytime the player logs out.
I also automatically save all the players current items to the SQLite database upon onPlayerLogout().