title: Update button error
body: <p>Our program when I click update button it updates all the data in the data grid view, what's wrong with our codes?
  This is our code </p>
  
  <pre><code>Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
      con.ConnectionString = ("server=localhost;user id=root;password=;database=sample4")
      Try
          con.Open()
          With cmd
              .Connection = con
  
              .CommandText = "UPDATE inventory SET product_name='" &amp; txtPN2.Text &amp; "',product_quantity='" &amp; txtQuan2.Text &amp; "',date='" &amp; txtDate2.Text &amp; "' WHERE 1"
              result = cmd.ExecuteNonQuery
              If result = 0 Then
                  MsgBox("Data has been already updated!")
              Else
                  MsgBox("Successfully updated!")
                  .CommandText = "Select product_name,product_quantity,date from inventory"
                  txtPN2.Clear()
                  txtQuan2.Clear()
                  txtDate2.Clear()
                  txtPN2.Focus()
  
              End If
          End With
      Catch ex As Exception
          MsgBox(ex.Message)
      End Try
      con.Close()
  End Sub
  </code></pre>