--- a/controllers/mysql.js
+++ b/controllers/mysql.js
@@ -144,7 +144,7 @@
 module.exports.insertNotification= function(data, callback){
 	date = new Date().toISOString().slice(0, 19).replace('T', ' ');
 	strSubject = data.subject + " = " + data.subjectValue;
-	var sqlQuery = "INSERT INTO notificationlist ( emailTo, subject, date, token) VALUES ('"+data.emailTo+"','"+strSubject+"', '"+date+"', '"+data.token+"')";
+	var sqlQuery = "INSERT INTO notificationlist ( emailTo, subject, date, token, ntype) VALUES ('"+data.emailTo+"','"+strSubject+"', '"+date+"', '"+data.token+"', "+parseInt(data.ntype)+")";
 	
 	handlerDB(sqlQuery, function(err, result){
 		if (err){
@@ -265,8 +265,18 @@
 	});*/
 }
 
-/*
-Retrieve Notifications
+
+module.exports.getNotificationsByListId = function(IDArray, cb){
+	handlerDB("select * from notificationlist where notificationID IN "+IDArray,function(err,res){
+		if(err){
+			cb(true, err)
+		}else{
+			cb(false, res)
+		}
+	})
+}
+/*
+Retrieve Notifications by appid
 */
 module.exports.retrieveNotificationList= function(appid,callback){
 	var sql = "SELECT token FROM registration where appID = '"+appid+"'";
@@ -279,7 +289,7 @@
 				callback(false,"AppID incorrect");
 			}
 			else{
-				var sqlQuery = "SELECT emailTo, subject, date, token FROM notificationlist where token = '"+res[0].token+"'";
+				var sqlQuery = "SELECT * FROM notificationlist where token = '"+res[0].token+"'";
 				handlerDB(sqlQuery, function(err, rows){
 					if (err){ 
 						callback(false,err);