【发布时间】:2019-12-29 17:59:47
【问题描述】:
db.js
const mysql = require('mysql');
const connection = mysql.createPool({
host: 'localhost',
user : 'xxxxx',
password : 'xxxxx',
database : 'xxxx'
})
module.exports = connection;
customer.js
const db = require("../../db");
在 customer.js 中,我需要调用 mysql 的 SP,它将采用 10 个输入参数,因为它将在表中插入一条记录。 使用 db.js 函数从 customer.js 调用 SP 的最佳方法是什么
【问题讨论】:
标签: mysql node.js stored-procedures