Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -28,10 +28,10 @@ exports.AddCards=(deckId,cards)=>{ | ... | @@ -28,10 +28,10 @@ exports.AddCards=(deckId,cards)=>{ |
28 | if (cardEnUS[i].name === cardName) { | 28 | if (cardEnUS[i].name === cardName) { |
29 | console.log(cardEnUS[i].dbfId) | 29 | console.log(cardEnUS[i].dbfId) |
30 | cardId = cardEnUS[i].dbfId | 30 | cardId = cardEnUS[i].dbfId |
31 | + cardName=cardName.replace('\'','\'\'') | ||
31 | break | 32 | break |
32 | } | 33 | } |
33 | } | 34 | } |
34 | - | ||
35 | connection.query(`insert into card (deckId,cardId,cardCost,cardName,cardNum) values (\'${deckId}\',\'${cardId}\',\'${cardCost}\',\'${cardName}\',\'${cardNum}\')`, (err, results, fields) => { | 35 | connection.query(`insert into card (deckId,cardId,cardCost,cardName,cardNum) values (\'${deckId}\',\'${cardId}\',\'${cardCost}\',\'${cardName}\',\'${cardNum}\')`, (err, results, fields) => { |
36 | // | 36 | // |
37 | if (err) throw err | 37 | if (err) throw err | ... | ... |
-
Please register or login to post a comment