当前位置:首页 > 数据库 > 正文

nodejs,mysql语句in的写法

2020-03-02 数据库

exports.findTest = async()=>{ const ids = [‘b3bc6e3dbb2a420aa8d569d70283e4ed‘, ‘6fa0671fd75d418398b5ab4a35bfe21d‘] const sql = `select id,pay_type from pet_register_info where id in (?)`; const result = await conn.query(sql, [ ids]); return result[0]; }

温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/SQL/22336.html