用mysql2插件发现用中文做参数获得不了数据,mysql字符集为utf-8
nodejs吧
全部回复
仅看楼主
level 1
utf-8字符集的mysql 用中文参数老是查不到要的数据
var values = ['川A 15683'];
mysqlconn.execute("SELECT * from cars where carno=?", values, function(err, rows, fields) {
不知道是那儿问题
直接这样都可以查到数据 mysqlconn.execute("SELECT * from cars where carno='川A 15683'", values, function(err, rows, fields) {
2013年12月06日 10点12分 1
level 10
不应该是values〔0〕吗
2013年12月08日 01点12分 2
level 6
为什么要用中文做参数,蛋疼么你
2013年12月26日 01点12分 3
你装的是豆腐吗
2013年12月28日 07点12分
1