Log SQL errors to conole

This commit is contained in:
IrosTheBeggar 2017-10-12 15:47:18 -04:00
parent 5041579bb2
commit 0f960f70fc

View File

@ -11,6 +11,10 @@ function getFileType(filename){
exports.getNumberOfFiles = function(username, callback){
db.get("SELECT Count(*) FROM items WHERE user = ?;", [username], function(err, row){
if(err){
console.log('SQL ERROR!');
console.log(err);
}
callback(row['Count(*)']);
});
}