var totsum = 0;var doc;var i;doc = orient.getDatabase().query("select productID from inf_list_item where userID = " + userID);for ( i = 0; i < doc.length; i++){ var prodIDDoc = doc[i];}return prodID;
var totsum = 0;var doc;var i;
doc = orient.getDatabase().query("select productID from inf_list_item where userId='"+ userID+"'");var array=[];
for ( i = 0; i < doc.length; i++){
array.push(doc[i].field("productID"));}return array;