Hello everyone, I am doing system for my server and I stuck with one thing. I need to get value from database, I added to player_items and Player_depoitems something like description (unique for item), how can I read that from database to my description (This one when u look on item - "You see bla bla bla.") I know how to put that in desc, but not really know how to get this value, I guess there is function needed. Cheers for help.
P.S. I tried to base it on item count taken from database but I can't find function responsible for that :/ (You know - "You see 6 eggs" <- the 6 is taken from db I think or stored in memory) So how to read this from db and write in memory or however to make it working.
@edit2
I think I found something
Am I on right way?:>
@EDIT3
Problem solved ;p I am proud of myself
P.S. I tried to base it on item count taken from database but I can't find function responsible for that :/ (You know - "You see 6 eggs" <- the 6 is taken from db I think or stored in memory) So how to read this from db and write in memory or however to make it working.
@edit2
I think I found something
Code:
ItemMap itemMap;
query.str("");
query << "SELECT `pid`, `sid`, `itemtype`, `count`, `attributes` FROM `player_items` WHERE `player_id` = " << player->getGUID() << " ORDER BY `sid` DESC";
if((result = db->storeQuery(query.str())))
@EDIT3
Problem solved ;p I am proud of myself
Last edited: