We on Zenox are using the SQLite database for our item system now. Maybe I will rescript some other systems to use SQLite. Its a great idea I think because its much faster and cleaner than using flat files (normal DB NPC's).
A good feature would be if I can convert defined row results directly into an array without using a for loop. For example:
PHP Code:
public function GetPlayerItems(placc) {
temp.items = {};
temp.req = GetSQL("SELECT ItemDB_Items.name AS itemname FROM ItemDB_Items INNER JOIN ItemDB_PlayerItems ON ItemDB_Items.ID=ItemDB_PlayerItems.item WHERE ItemDB_PlayerItems.player=(SELECT ID FROM Players WHERE account LIKE '"@SQLEscape(placc)@"')",true);
if (temp.req!=null && temp.req.error=="") {
for (temp.row : temp.req.rows)
temp.items.add(temp.row.itemname);
}
return temp.items;
}
Okay its not a big problem with a for loop but I think it can be solved more optimized
