diff options
Diffstat (limited to 'mtg-pdf.php')
-rw-r--r-- | mtg-pdf.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mtg-pdf.php b/mtg-pdf.php index 068c91e..55b8112 100644 --- a/mtg-pdf.php +++ b/mtg-pdf.php @@ -41,10 +41,10 @@ foreach ($cards as $card) { SELECT cardIdentifiers.scryfallId, cards.layout FROM cardIdentifiers JOIN cards ON cardIdentifiers.uuid=cards.uuid - WHERE (cards.name=:name OR cards.faceName=:name) AND cards.setCode=:setCode AND cards.number=:number + WHERE cards.setCode=:setCode AND cards.number=:number SQL; $statement = $db->prepare($query); - $statement->execute(['name' => $card['name'], 'setCode' => $card['set'], 'number' => $card['number']]); + $statement->execute(['setCode' => $card['set'], 'number' => $card['number']]); $result = $statement->fetch(); $id = $result['scryfallId'] ?? ''; @@ -53,10 +53,10 @@ foreach ($cards as $card) { SELECT tokenIdentifiers.scryfallId, tokens.layout FROM tokenIdentifiers JOIN tokens ON tokenIdentifiers.uuid=tokens.uuid - WHERE (tokens.name=:name OR tokens.faceName=:name) AND tokens.setCode=:setCode AND tokens.number=:number + WHERE tokens.setCode=:setCode AND tokens.number=:number SQL; $statement = $db->prepare($query); - $statement->execute(['name' => $card['name'], 'setCode' => $card['set'], 'number' => $card['number']]); + $statement->execute(['setCode' => $card['set'], 'number' => $card['number']]); $result = $statement->fetch(); $id = $result['scryfallId'] ?? ''; |