Maybe this is what you're looking for.
DB_test:
PHP Code:
function onCreated() {
this.item_100 = "test";
}
public function findItem(temp.id) {
return this.(@ "item_" @ temp.id);
}
Script:
PHP Code:
function onCreated() {
this.id = 100;
}
function onPlayerTouchsMe() {
player.chat = DB_test.findItem(this.id);
}