jhale1966 Posted November 28, 2003 Share Posted November 28, 2003 In my game I have several tables of different decks of cards. Now, some of these cards are duplicated in the deck (items, spells, etc.) and each card has a unique \'cardid\' entry in the table. Now, if a player achieves a spell, and the deck has 3 copies of the same spell (and they have separate unique cardid\'s), all 3 entries are tagged as drawn by the player - where it should only tag one of them, freeing the other two entries to be drawn by other players. The Table search is done based on the Spell NAME (not the cardid) so that I have the ability to add more spells in the future. How do I tag just ONE instance of the card in the DB instead of ALL of them? Thanks! Quote Link to comment Share on other sites More sharing options...
Z24_2000 Posted December 3, 2003 Share Posted December 3, 2003 Not sure if this is a good approach, but... You could add a prefix to the Card Name i.e. A Stinky Spell B Stinky Spell C Stinky Spell Then Parse the first part of the Card Name before displaying it. This way you\'ll know which one to tag as being drawn. Another idea might be to add a column to the table for use by cards that are duplicates and throw A, B and C into the coressponding columns. Use that as a foreign key when tagging the cards as being drawn. Both solutions imply a little more work, which is why I\'m not sure that either will work in your situation. Just some ideas for you to think about. Hope this helps, Andrew Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.