小编dan*_*uxx的帖子

Firebase 更新子 Javascript

我想将子状态更新为 Active,但我真的不知道如何解决这个问题。我想更新一个特定的记录,我正在使用表 btw。我已经被困在这里了。请帮我。谢谢!

<script>
  // Get a reference to the database service
  var database = firebase.database();

  database.ref('Users').orderByChild('usertype').equalTo('Property Owner').on('value', function(snapshot) {
    if (snapshot.exists()) {
      var content = '';
      snapshot.forEach(function(data) {

        var stat = data.val();
        if (stat.status == 'Inactive') {
          var val = data.val();
          content += '<tr>';
          content += '<td>' + val.fname + '</td>';
          content += '<td>' + val.mname + '</td>';
          content += '<td>' + val.lname + '</td>';
          content += '<td>' + val.email + '</td>';
          content += '<td>' + val.registered + '</td>'; …
Run Code Online (Sandbox Code Playgroud)

javascript firebase firebase-realtime-database

1
推荐指数
1
解决办法
2423
查看次数