Skip to content

Instantly share code, notes, and snippets.

@uyu423
Last active July 18, 2016 17:52
Show Gist options
  • Save uyu423/b7f8c1d7c2d344ed47de037523a58065 to your computer and use it in GitHub Desktop.
Save uyu423/b7f8c1d7c2d344ed47de037523a58065 to your computer and use it in GitHub Desktop.
//node-qsb를 사용한 데이터베이스 쿼리문 관리
var qsb = require('node-qsb');
var mysql = require('../config/mysql.js')
var params = {
cols : ['email', 'passwd', 'uName', 'stdNum', 'major', 'phone', 'emailNotify', 'tIdx'],
vals : [req.email, req.sha2passwd, req.uName, req.stdNum, req.major, req.phone, req.emailNotify, '5'],
}
var usingQsbQs = new qsb()
.insert("users")
.values(params.cols, params.vals)
.build();
mysql.execute(qs.returnString(), function(err, res) {
////
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment