commit 08a570a38aa27cce86e18117171d4046f8a4ee66 parent 3cdcf3093a3163581e282328ac563edef1a5df5b Author: Dan Stillman <dstillman@zotero.org> Date: Fri, 16 Jun 2006 15:18:01 +0000 Item.numNotes() Diffstat:
| M | chrome/chromeFiles/content/scholar/xpcom/data_access.js | | | 8 | ++++++++ |
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/chrome/chromeFiles/content/scholar/xpcom/data_access.js b/chrome/chromeFiles/content/scholar/xpcom/data_access.js @@ -714,6 +714,14 @@ Scholar.Item.prototype.removeNote = function(noteID){ } /** +* Returns number of notes in item +**/ +Scholar.Item.prototype.numNotes = function(){ + var sql = "SELECT COUNT(*) FROM itemNotes WHERE itemID=" + this.getID(); + return parseInt(Scholar.DB.valueQuery(sql)); +} + +/** * Get the text of an item note **/ Scholar.Item.prototype.getNote = function(noteID){