作者:chucai | 来源:互联网 | 2023-05-18 18:03
Iamtryingtogetdatafromtwotableslike(fetchallusersandtheirdetails)我试图从两个表中获取数据(获取所有用户
I am trying to get data from two tables like (fetch all users and their details)
我试图从两个表中获取数据(获取所有用户及其详细信息)
tableOne.on('users', function (snapshot) {
userId = snapshot.val().userId; // line 1 (results like 1,2,3,4,5,6)
anotherTable.child('userdetails').child(userId).once('value', function(mediaSnap) {
// result // line 2
});
});
but the problem is line 1 executes first for the 6 times and then line 2 that n times resulting in everytime looking for 'where user id is - 6'...isn't joins supported in Firebase?
但问题是第1行首先执行6次,然后第2行执行n次,导致每次都在寻找“用户ID为 - 6”的地方...... Firebase中是否支持加入?
Any help is apreciated
任何帮助都是相关的
2 个解决方案