I can't send value to mysql



  • Id, is on auto increment feature so it says NULL

    var mysql = require('mysql2');
    
    var con = mysql.createConnection({
      host: "localhost",
      user: "root",
      password: "",
      database: "indirimyedb"
    });
    
    con.connect(function(err) {
      if (err) throw err;
      
    
      var sql = "INSERT INTO token (id,token,cookie,aktif) VALUES (NULL, '{{Token}}', '[[COOKIES]]', '1' )";
      
      con.query(sql, function (err, result) {
        if (err) throw err;
        
      });
    });
    

    ERROR IS;
    0b2d8729-b093-4006-af84-ed6c1cda8bcd-image.png


Log in to reply