Ich hab in Java folgendes Query:
Jetzt will ich das WHERE erweitern:
Wenn <damageable==true> DANN <prüfe, ob durability==0>
Wie stelle ich das an?
Struktur:
SQL:
SELECT f.* FROM (SELECT item,min(price) AS minprice FROM stock GROUP BY item) AS x INNER JOIN stock AS f on f.item = x.item AND f.price = x.minprice WHERE (world = 'world' OR world = 'world_nether')
Wenn <damageable==true> DANN <prüfe, ob durability==0>
Wie stelle ich das an?
Struktur:
SQL:
CREATE TABLE stock('id' integer primary key,'durability' integer, 'damageable' boolean, 'enchantments' varchar(80),'world' varchar(80),'seller' varchar(80) not null,'item' integer not null, 'price' float not null,'amount' integer not null)