Browse files

Don't look for recent bins that haven't been updated…obviously

  • Loading branch information...
remy committed Aug 17, 2012
1 parent 9d432eb commit 1fefc3fc8467f50efd9835c6466a35f2227b763e
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/db/sql_templates.json
@@ -12,7 +12,7 @@
"setBinForUser": "INSERT INTO `owners` (`name`, `url`, `revision`) VALUES (?, ?, ?)",
"getBinsByUser": "SELECT `url`, `revision` FROM `owners` WHERE `name`=? ORDER BY `url`, `revision` DESC",
"getBinByUrlAndRevision": "SELECT * FROM `sandbox` WHERE `url`=? AND `revision`=? LIMIT 1",
- "getLatestBinForUser": "SELECT `url`, `revision` FROM `owners` WHERE `name`=? ORDER BY `last_updated` DESC LIMIT 1",
+ "getLatestBinForUser": "SELECT `url`, `revision` FROM `owners` WHERE `name`=? AND `last_updated` != 0 ORDER BY `last_updated` DESC LIMIT 1",
"touchOwnership": "UPDATE `owners` SET `last_updated`=? WHERE `name`=? AND `url`=? AND `revision` = ?",
"updateUserEmail": "UPDATE ownership SET `email`=?, `updated`=? WHERE `name`=?",
"getUserByEmail": "SELECT * FROM `ownership` WHERE `email`=? LIMIT 1",

0 comments on commit 1fefc3f

Please sign in to comment.