J
J
jekanok2019-04-08 11:56:14
MySQL
jekanok, 2019-04-08 11:56:14

How to make a query in sql?

Here is the given code:

connection.query(
    'INSERT INTO `message` (email, name, message) VALUES (":email", ":name", ":message")',
    { email: req.body.email, name: req.body.name, message: req.body.message },
    (err, result) => {
      console.log(req.body);
      console.log(req.body.name);
      console.log(result);
      res.send(result);
    }
  );

why can't I send changes, or how to compose them. Thanks for the help!!!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Kudryavtsev, 2019-04-08
@jekanok

It is possible to transfer through `$(var)`.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question