Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- router.get(`/tools/${table}`, (req, res) => {
- con.query(
- `SELECT * FROM ${req.params.table} WHERE particulars = '${checkValue}' `,
- (err, result) => {
- if (err)
- return res
- .status(400)
- .json({ connectionError: "Failed to connect with database" });
- return res.json(result);
- }
- );
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement