title: How to update different rows of two columns with variables which represent the id of the other row using mysqli and PHP?
body: <p>I'm not very experienced with SQL in general and I'm wondering how to combine these two separate update strings using the same variables:</p>
  
  <pre><code>$queryA = 'UPDATE table SET redirectsToId  ='.$redirectId.' WHERE id='.$id;    
  $queryB = 'UPDATE table SET redirectFromId ='.$id.'         WHERE id='.$redirectId;
  </code></pre>
  
  <p>Thanks in advance for any suggestion.</p>
  
  <p>EDIT: What is the most performant way to do so in general?</p>