小波比.JSHint常见错误解决"/>
小黑小波比.JSHint常见错误解决
1.错误信息:
2.Bad line breaking before '+'.
错误代码:
"infos_getsubscrib": {sql: "select * from events t"+" left join (select count(*) as sends,ecode from events_push group by ecode) b"+" on t.ecode= b.ecode"+" left join (select count(*) as count,ecode from events_push where status = 1 group by ecode) c"+" on t.ecode = c.ecode"+" where t.revent=:revent"},
正确代码:
"infos_getsubscrib": {sql: ["select * from events t"," left join (select count(*) as sends,ecode from events_push group by ecode) b"," on t.ecode= b.ecode"," left join (select count(*) as count,ecode from events_push where status = 1 group by ecode) c"," on t.ecode = c.ecode"," where t.revent=:revent"].join(" ")},
3.The array literal notation [] is preferbale.
错误代码:
var rowsarr = new Array();
正确代码:
var rowsarr = [];
更多推荐
小黑小波比.JSHint常见错误解决
发布评论