Item.numNotes()
This commit is contained in:
parent
3cdcf3093a
commit
08a570a38a
1 changed files with 8 additions and 0 deletions
|
@ -713,6 +713,14 @@ Scholar.Item.prototype.removeNote = function(noteID){
|
|||
return Scholar.DB.query(sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
**/
|
||||
|
|
Loading…
Reference in a new issue