Tuesday, July 28, 2009

Favorite: getting metadata for favorite

For Favorite page, getting metadata for games that had mid retrieved from favorite table is a little tricky, since I must retrieve the mid from favorite table by criteria userid; then I must use this mid as a criteria to retrieve game information from metadata table.

I first tried with ArrayList and for loops: My thought on it was to retrieve the mids from favorite table and store them into an ArrayList. Then, in a different function, under using for loops, inquire the metadata table with each item from the ArrayList. However, this process seemed a little tideous, and involved two methods. I tried another way, after I found out I could make more inquiries before my previous inquiry is closed. So I could inquire for mid from favorite table first, then, in a while loop, start a second inquiry for game information using the mid I just retrieved.

No comments:

Powered By Blogger