Archived from groups: rec.games.trading-cards.magic.misc (
More info?)
On Fri, 2 Jul 2004, Simon Nejmann wrote:
> On Thu, 1 Jul 2004 23:41:27 +0200, David de Kloet <dskloet@cs.vu.nl>
> wrote:
>
> >I could but there is one problem.
> >By default some ordering criteria are already in descending order:
> >Ordering by expansion starts with the newest, by value will start with
> >the highest value and by popularity will start with the most popular.
> >
> >When I add the "reverse order" checkbox, should it always sort
> >ascending when the box isn't checked? Or should it be like it's now by
> >default?
>
> Hmm, I would say, keep the defaults like the current default - those
> looks like the most used versions.
Ok, I'll see what I can do.
> On a different note. I have been trying to undestand the way you
> handle expansions, but I have stumbled upon something I just can't
> undestand... If I use your sql text field and give it:
>
> cards.expansion = 18 and oracle.name like '%Aladdin''s Ring%'
> or
> cards.expansion = 17 and oracle.name like '%Aladdin''s Ring%'
>
> It sucessfully finds Aladdin's Ring, but it finds nothing if I give
> it:
>
> cards.expansion = 17 and cards.expansion = 18 and oracle.name like
> '%Aladdin''s Ring%'
>
> This is not really suprising, since I kinda asks it to find all where
> 17 = 18.
You've got it
> So, my question is whether it is possible to use your interface to
> find eg. all cards both in 7th and 8th editions?
It is possible to get them from my database but not with the
webinterface.
> Alternatively, how cards.expansion can be both 17 and 18, though not
> at the same time?
The 2 most important tables in my database are 'oracle' and 'cards'.
'oracle' basicly contains the information from The Card Reference Oracle.
And 'cards' contains information on which card is in which expansion
with which rarity, flavor text and artist etc.
If possible only the table 'oracle' is queried but when information
from 'cards' is necessary 'oracle' is joined with 'cards'. In 'cards'
the is a separate tuple for each version of a card. So when you search
for expansion = 17 you actualy get another card than when you search
for expasnion = 18.
To get all cards which are in both 17 and 18 you would have to join
'cards' with itself. Approximately like this:
select * from cards c1, cards c2 where c1.expansion = 17 and
c2.expansion = 18 and c1.oralce_id = c2.oracle_id;
But since the interface doesn't allow you to perform joins you cannot
get this from my website. I don't know how much you know of mysql but
I hope this explains some details to you.
--
David