title: sql query how to put 2 "where"condition
body: <p><img src="https://i.stack.imgur.com/6uQAf.jpg" alt="enter image description here"></p>
  
  <p>first this is the table relationship.
  below is what i'm trying to achieve</p>
  
  <pre><code>Dim ad As New SqlDataAdapter("SELECT inventory.ItemName,record_item.Amount FROM record_item,inventory WHERE (record_item.RecordID = '" &amp; listbox1.SelectedItem &amp; "')", conn)
  </code></pre>
  
  <p>if i'm trying to get ItemName based on the RecordID that i have,do i need to put 2 condition? if i do, how?</p>
  
  <p><code>WHERE (record_item.RecordID = '" &amp; listbox1.SelectedItem &amp; "')</code> and <code>WHERE(record_item.ItemID=inventory.ItemID)</code></p>