Topic: Export not using correct card name & genreral DB question

It took me all week to to input inventory and now I am exporting to backup my labor (to a degree). Problem is that the export is listing at least one card with the wrong name and I only caught it because of the weird multiple entry for same Name+Edition. I have not vetted all of the export yet to see if this is the only discrepancy.

12    Swamp    Mercadian Masques    Basic Land  - Swamp
1    Swamp    Mercadian Masques    Basic Land  - Swamp

My guess is that the single card is in fact http://deckbox.org/mtg/Subterranean%20Hangar

This brings up the question of just how much "cooking" are you doing to the DB queries since the card lists correctly as Inventory but not as Export? I assume you are storing index values in the main table and using lookup tables for the text but then clearly doing the lookup differently for inventory vs. export.

On same thought path I discovered while looking into this that Filter for Color DOES NOT work for land cards, rather it considers them to have Color = colorless and on same token searching for non-numerical cost can not be done i.e. Cost = x yields no results. There are likely more examples that did not jump out at me. My guess that it's an oversight that Land should have color values or that Cost is more than integer values?

Not sure what the DB backend is but I'm aware from my Coldfusion developer days the peril of using the UI strings directly in backend SQL queries w/o exposing yourself to code injection but mitigating it increases the work load on developers trying to prevent inevitable user frustration over "lost in translation" or "can't express".

That said, the question on everyone's mind seems to be why import still does not do the natural reverse of export for the 3 key unique values of a record: Qty, Name, Edition much less the 2 lesser values of Language & Condition? Seems to me there's no difference in the complexity of site code or the SQL statement for using Qty & Name from user input while defaulting to latest Edition (or leaving it blank) vs. going the extra mile to use the user supplied values! Sure it takes a sanity check (as it does for card name anyway) to verify the card exists in the edition listed but it just makes it a multi-criteria lookup. As it stands I'm doing all this data entry and the best I can hope for if I have to import from this "backup" is that all my card names & total numbers will be there but I will still have to do the tedious (lacking SQL like access or batch commands never mind a proper import function) card by card edit to set Edition, Condition, Language by hand. Heck it seems that the code for Inventory and Export might even benefit from working on this if they are currently producing different results for seemingly the same lookups.

Thank you for this free solution and please consider integrating these changes into the site's functionality.

Re: Export not using correct card name & genreral DB question

Follow up details:

For no Column I get:

1    Subterranean Hangar

Add "Edition" Column:

1    Subterranean Hangar    Mercadian Masques

Lastly Add Edition + "Type" get:

1    Swamp    Mercadian Masques    Basic Land  - Swamp

So what are you doing differently in the 3rd to result in a different card name? seems to me these queries build on one another thus would be one chunk of code with conditional adds for extra parameters but clearly these are 3 distinct, separate code chunks to get these results.

Last edited by t3chnomanc3r (2012-09-12 04:14:02)

Re: Export not using correct card name & genreral DB question

Additional note:

Filter by Edition shows "2013" twice in the drop down list, also shows as selected twice after "applying" filter.

Last edited by t3chnomanc3r (2012-09-15 11:45:47)

Post's attachments

deckbox.org-edtion error.png
deckbox.org-edtion error.png 64.3 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Export not using correct card name & genreral DB question

Hello, thanks for bringing this to our attention, and with a detailed report.

On the issue of Magic 2013 appearing twice - this has been now fixed.

The CSV export, and the Advanced card import are getting some changes and fixes in our upcoming release (due end of this month), The CSV files exported will be directly "importable".

Also the Subterranean Hangar issue looks like a bug on our side, we are investigating that as well.

Re: Export not using correct card name & genreral DB question

OK, guess PM me when the other fixes happen if you can.

Meanwhile let me add this cosmetic error to the stack: choosing no columns options from Dropdown menu results in string "u" rather than "Columns" or some other descriptive text.


      <div id="columns_container" class="_button_container">
        <div id="columns_button" class="_button _dropdown"><span>u</span></div>
      </div>
      <script type="text/javascript">
          var _d_c = new DropdownMulti([["Type","t"],["Cost","c"],["Power","p"],["Toughness","o"],["Last Added","l"],["Edition","e"],["Price","i"]], {
              id: 'filter_values_columns', persistent: false,
              applyBtnTxt: 'Apply', onApply: function() { Tcg.set.setColumns(_d_c.selectedValues.values()); },
              button: { id: 'columns_button' },
              initial: ["u","n","a","r"]
          });
      </script>
Post's attachments

column-options-error.png
column-options-error.png 39.77 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Export not using correct card name & genreral DB question

Hello t3chnomanc3r, sorry for the delay in looking at this issue.

In your inventory csv export there is indeed a Mercadian Masques Mint condition Swamp, but that is correct, as you have it listed as such in your inventory.

1 Subterranean hangar is also present in your inventory, with mercadian masks listed as edition, and is also present in the export.

Can you please clarify why you think the csv is not correct?

Re: Export not using correct card name & genreral DB question

Looking again I see I missed something reading the output when I posted originally and used short circuit logic vetting the issue's validity. There is in fact no issue (other than my blindness), it was that one basic land of different condition in the Mercadian edition tripped me up thinking somehow Subterranean Hanger was be listed as a generic basic land in the exports. Any rate, just did an export with Details + Type and quick look over says it's accurate so I'll shy back to lurk mode with a red face! sad

sebi wrote:

Hello t3chnomanc3r, sorry for the delay in looking at this issue.

In your inventory csv export there is indeed a Mercadian Masques Mint condition Swamp, but that is correct, as you have it listed as such in your inventory.

1 Subterranean hangar is also present in your inventory, with mercadian masks listed as edition, and is also present in the export.

Can you please clarify why you think the csv is not correct?

Re: Export not using correct card name & genreral DB question

Haha, no worries.

Re: Export not using correct card name & genreral DB question

I've found a similar problem where a card is not imported correctly. When I put 'Xathrid Gorgon' in the multi-card import, it's not recognized. When I put it in the single-card input box, it works fine.

Re: Export not using correct card name & genreral DB question

Jorn86 wrote:

I've found a similar problem where a card is not imported correctly. When I put 'Xathrid Gorgon' in the multi-card import, it's not recognized. When I put it in the single-card input box, it works fine.


If that problem is consistent (happens each time you try it, after a reboot), I recommend putting it in a new thread.

Profile - Wishlist - Tradelist

Black and Blue--not just for bruises anymore.

Re: Export not using correct card name & genreral DB question

It's related to an older reported issue, and we've fixed it for the next release already. Should be in the next deploy which is coming soon(tm). big_smile

Re: Export not using correct card name & genreral DB question

maybe this thread should be closed? I can always raise the other issues again later if the next update still has them.

Last edited by t3chnomanc3r (2012-09-25 22:33:02)