摘要:
js的回调函数还是很有学问的。情景 nodejs循环读取数据库,回调函数回调的时候里面的index就早就被修改了。纠结了好久错误代码:UserPokemonService.getPokemonOfUserCarry = function (connection, userId, callback) { console.log('getPokemon'); var sql = 'SELECT * FROM user_pokemon WHERE user_id = \'' + userId + '\' and place > 0; 阅读全文