Skip to content

Commit

Permalink
Unbroke update command
Browse files Browse the repository at this point in the history
  • Loading branch information
kfsone committed Apr 30, 2015
1 parent de9cf38 commit 9ac3406
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions prices.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def dumpPrices(
now = cur.fetchone()[0]

stmt = """
SELECT si.station_id, si.item_id
SELECT stn.station_id, itm.item_id
, IFNULL(si.demand_price, 0)
, IFNULL(si.supply_price, 0)
, IFNULL(si.demand_units, {defDemand})
Expand All @@ -102,7 +102,7 @@ def dumpPrices(
ON (si.station_id = stn.station_id
AND si.item_id = itm.item_id)
{stationWhere}
ORDER BY si.station_id, cat.name, itm.ui_order
ORDER BY stn.station_id, cat.name, itm.ui_order
"""

sql = stmt.format(
Expand Down Expand Up @@ -225,4 +225,4 @@ def dumpPrices(
if __name__ == "__main__":
import tradedb
tdb = tradedb.TradeDB(load=False)
dumpPrices(tdb.dbPath, elementMask=Element.full)
dumpPrices(tdb.dbPath, elementMask=Element.full)

0 comments on commit 9ac3406

Please sign in to comment.