title: how update buttons (rooms) on specific date acording to database?
body: <p><a href="https://i.stack.imgur.com/X833U.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X833U.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/yiljQ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yiljQ.jpg" alt="enter image description here"></a></p>
  
  <p>I create database using <em>curentdate</em> (1-25) as <code>parent id</code> and using <em>room</em> (08-00_11-00_karpet1-) as <code>child id</code>. inside this database are user information that order that room (<code>child id</code>) on that date (<code>parent id</code>).</p>
  
  <p><strong>Question 1</strong></p>
  
  <p>using this layout design, how do i <strong>disable button</strong> that have been ordered so that indicate that room no longer available.</p>
  
  <p>(example. user order <strong>karpet 14-17</strong> on <strong>1-28</strong>, when user create order database will update database <code>datajadwal</code> based on <em>date</em> (<strong>parentid</strong>) >> <em>room</em> (<strong>childid</strong>) >> userinformation (email.name.phone.etc) ) </p>
  
  <p><strong>Question 2</strong></p>
  
  <p>each date have 5 rooms. when specific date click, room button will disabled according to the data on <code>datajadwal</code> and on that date (<code>parentid</code>), if there are no room data (<code>childid</code>) that means that room are available.</p>
  
  <p><strong>my situation</strong> =
   i don't know hot to get the <code>childid</code></p>
  
  <pre><code>private void datajadwalupdate(){
          databseJadwal = database.getReference("datajadwal").child(haritanggalOrder);
          databseJadwal.addListenerForSingleValueEvent(new ValueEventListener() {
              @Override
              public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
                  for (DataSnapshot dateSnapshot: dataSnapshot.getChildren()) {
                      final String rooms = dataSnapshot.getKey();
                      databseJadwal.child(haritanggalOrder).child(rooms).addValueEventListener(new ValueEventListener() {
                          @Override
                          public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
  
                          }
  
                          @Override
                          public void onCancelled(@NonNull DatabaseError databaseError) {
  
                          }
                      });
                  }
              }
  
              @Override
              public void onCancelled(@NonNull DatabaseError databaseError) {
  
              }
          });
      }
  </code></pre>
  
  <p>this is where I'm, but got error on a null object reference</p>