- Booking Event (with email to user and admin)
- Cancel Event (with email to user and admin) - Store into mongodb
This commit is contained in:
39
server/mysql/mysql_func.js
Normal file
39
server/mysql/mysql_func.js
Normal file
@@ -0,0 +1,39 @@
|
||||
const mysql = require('mysql');
|
||||
|
||||
|
||||
const mySqlConn_Shen = mysql.createConnection({
|
||||
host : '198.136.49.34',
|
||||
user : 'assoc499_user',
|
||||
password : 'mypassmysql@1A',
|
||||
database : 'assoc499_1',
|
||||
debug: true
|
||||
});
|
||||
|
||||
|
||||
module.exports = { mySqlConn_Shen };
|
||||
|
||||
|
||||
// POOL:
|
||||
// const pool = mysql.createPool({
|
||||
// connectionLimit : 100, //important
|
||||
// host : '198.136.49.34',
|
||||
// user : 'assoc499_user',
|
||||
// password : 'mypassmysql@1A',
|
||||
// database : 'assoc499_1',
|
||||
// debug : false
|
||||
// });
|
||||
//
|
||||
//
|
||||
// function pool_queryRow(tablename, fieldID, IdValue) {
|
||||
// let selectQuery = 'SELECT * FROM ?? WHERE ?? = ?';
|
||||
// let query = mysql.format(selectQuery,[tablename,fieldID, IdValue]);
|
||||
// // query = SELECT * FROM `tablename` where `fieldID` = 'IdValue'
|
||||
// pool.query(query,(err, data) => {
|
||||
// if(err) {
|
||||
// console.error(err);
|
||||
// return;
|
||||
// }
|
||||
// // rows fetch
|
||||
// console.log(data);
|
||||
// });
|
||||
// }
|
||||
Reference in New Issue
Block a user