commit c561ca129efd5bdc5641cdd05282a17bddf8b114 parent 338bb54fdca009cc69f61394c3205ad0763a3c5d Author: Dan Stillman <dstillman@zotero.org> Date: Fri, 2 Jun 2006 21:11:14 +0000 Reverting r111 change to bound parameters for Item.erase() (minus the exception fix) -- bound parameters/multiple statements/no can do Item deleting should work properly now Diffstat:
| M | chrome/chromeFiles/content/scholar/xpcom/data_access.js | | | 10 | +++++----- |
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/chrome/chromeFiles/content/scholar/xpcom/data_access.js b/chrome/chromeFiles/content/scholar/xpcom/data_access.js @@ -662,12 +662,12 @@ Scholar.Item.prototype.erase = function(){ Scholar.Collections.get(parentCollectionIDs[i]).removeItem(this.getID()); } - sql = "DELETE FROM itemCreators WHERE itemID=?1;\n"; - sql += "DELETE FROM itemKeywords WHERE itemID=?1;\n"; - sql += "DELETE FROM itemData WHERE itemID=?1;\n"; - sql += "DELETE FROM items WHERE itemID=?1;"; + sql = 'DELETE FROM itemCreators WHERE itemID=' + this.getID() + ";\n"; + sql += 'DELETE FROM itemKeywords WHERE itemID=' + this.getID() + ";\n"; + sql += 'DELETE FROM itemData WHERE itemID=' + this.getID() + ";\n"; + sql += 'DELETE FROM items WHERE itemID=' + this.getID() + ";\n"; - Scholar.DB.query(sql, [{'int':this.getID()}]); + Scholar.DB.query(sql); Scholar.Creators.purge(); try {