node.js - MySQL query WHERE with object as result -
i'm searching data.mesaj
in mysql query connection running cause query isn't running, data.mesaj
have, don't want this:
data = { mesaj: '\nhello', uid: 'mustafa' }
y=data.mesaj; var row = []; connection.query('select * yapay_zeka yapay_zeka.soru = y ', function (err, rows) { if (err) { console.log(err); } else { if (rows.length) { (var = 0, len = rows.length; < len; i++) { row[i] = rows[i]; console.log(row); } } }
i found it:
connection.query("select * yapay_zeka yapay_zeka.soru = ?',[data.mesaj]
Comments
Post a Comment