title: use update to update any one of the two tables
body: <p>I have two tables <code>user_pv</code> and <code>vendors_pv</code> both having same feilds.</p>
  
  <p><strong>users_pv</strong> => has users and their balance</p>
  
  <p><strong>vendors_pv</strong> => has vendors and their balance</p>
  
  <p>Now i want to update balance of user or vendor based on the a value , which is obtained through some php process  . So i wrote a query like this</p>
  
  <pre><code>update users_pv a INNER JOIN vendors_pv b set a.Balance = a.Balance +
  '240' , b.Balance = b.Balance + '40' where a.UserId = 'someid' or
  b.UserId = 'someid'
  </code></pre>
  
  <p>Basically this <strong><code>someid</code></strong> value might be in any one of the table. so i need to update the user with <code>UserId</code> <strong><code>someid</code></strong></p>
  
  <p>Bu the problem here is the query is updating all the users and vendors.Please help me to solve it</p>
  
  <p><strong>Note:</strong> in the query i tried to replace <code>or</code> with <code>and</code> which result in updating <strong><code>0</code></strong> rows</p>