CJYen 3 vuotta sitten
vanhempi
commit
50d7bef9ec
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      main.py

+ 1 - 1
main.py

@@ -260,7 +260,7 @@ def shop(userid):
     # db connect
     db = dataset.connect('mysql://choozmo:pAssw0rd@db.ptt.cx:3306/arkcard?charset=utf8mb4')
 
-    sql = 'SELECT DISTINCT title FROM arkcard.nft WHERE userid IS NULL OR userid="" LIMIT 5'
+    sql = 'SELECT DISTINCT(title), id, imgurl, userid FROM arkcard.nft  WHERE id<1001 and userid IS NULL GROUP BY title LIMIT 5'
     result = db.query(sql)
     rows = {}
     i = 0