Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var db_abc= express();
- var mysql = require('mysql')
- var connection = mysql.createConnection({
- host: 'localhost',
- user: 'root',
- password: '',
- database: 'abc_db'
- })
- connection.connect(function (err) {
- if (err) throw err
- console.log('You are now connected...')
- })
- module.exports = db_abc;
- var db_abc = require('../db_abc')
- db_abc.connection.query('SELECT tid, type, status, ' +
- 'created, modified, jdp_response FROM jdp_tb_trade ' +
- 'WHERE status="TRADE_FINISHED" AND type = "tmall_i18n" ' +
- //'AND DATE_ADD(NOW(), INTERVAL ' + start + ' MINUTES) <= modified' +
- // 'AND DATE_ADD(NOW(), INTERVAL ' + end + ' MINUTES) >= modified' +
- 'ORDER BY modified',
- function (err, results) {
- if (!err)
- console.log('The solution is: ', results);
- else
- console.log('Error while performing Query.');
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement