title: Update data using SQL android studio
body: <p>DAO</p>
  <pre><code>@Query(&quot;SELECT * FROM shopping WHERE modified = 1&quot;)
      fun getModify(shopping: Shopping)
  
      @Insert(onConflict = OnConflictStrategy.REPLACE)
      fun modify(shopping: Shopping)
  </code></pre>
  <p>Implementation</p>
  <pre><code>binding.btl2.setOnClickListener {
              val toast = Toast.makeText(applicationContext, &quot;HelloTEST&quot;, Toast.LENGTH_SHORT)
              toast.show()
  
  
              viewModel.getModify()
              viewModel.modify(
                  Shopping(
                      product = binding.edl1.text.toString(),
                      quantity = binding.edl2.text.toString(),
                      price = binding.edl3.text.toString(),
                      bought = binding.ch1.isChecked
  
                  ))
  
  
          }
  </code></pre>
  <p>How to implement it well? I have error with viewModel.getModify().
  I would like to run these two methods getModify and then modify() after one click.</p>
  <p>So program should choose from database only these which are checked as true(1) and then using button modify.</p>