D
D
Dvorak2016-09-21 23:35:28
MySQL
Dvorak, 2016-09-21 23:35:28

Why can't I insert data into the table?

I work with the database like this:

const pool = mysql.createPool({
  host: 'localhost',
  user: 'debian-sys-maint',
  password: '0YHR03vlLavnCC48',
  db: 'users'
});

    pool.getConnection((err, connection) => {
      connection.query('INSERT INTO passport SET id = 2, name = "mak", pass = "kek"', (err, rows, fields) => {
        connection.release();
        console.log(rows, fields);
      });
    });

But in the console I see only undefined undefines.
Here are the table parameters:
a568760d36324d03be8b1db8438b0190.png
UPD: Everything works in the console. Unable to insert data in the node

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan, 2016-09-22
@LiguidCool

You have an Insert there, what should it return to you?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question