javascript - i want a random array value to be thrown into my database, how? -


  var sql = "insert info (name, age, lastname) values ?";   var values = [     ['johny', '28', 'high'],     ['peeter', '39', 'lowsta'],     ['amie', '25', 'pear'],     ['hanah', '27', 'main']   ];     con.query(sql, [values], function (err, result) {      console.log("number of records inserted: " + result.affectedrows);   }); })``; 

i have code dont want give every value in array 1 random 1 how do that? (right give values in array , want give 1 of them must random)


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -