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

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -