Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let mysql = require('mysql');
- var pool = mysql.createPool({
- connectionLimit: 5,
- host: '162.241.170.159',
- user: 'mobilepl_dbph',
- password: 'cityBlends2018',
- database: 'mobilepl_pbph'
- });
- pool.getConnection(function(err, connection) {
- if(err){
- console.log('Database', err);
- res.json({"success" : false, "message" : "Something went wrong. Please try again later."});
- }else{
- let sql = `INSERT INTO`;
- connection.query(sql, function (err, result) {
- if (err){
- console.log("YEARLY BILLING PLAN CREATED");
- res.json({"success" : false, "message" : "Failed to create billing plan"});
- }else{
- console.log("YEARLY BILLING PLAN CREATED");
- res.json({"success" : true, "billing_plan_id" : billingPlan.id});
- }
- connection.release();
- });
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement