title: PHP: Update multiple MySQL fields in single query
body: <p>I am basically just trying to update multiple values in my table. What would be the best way to go about this? Here is the current code:</p>
  
  <pre><code>$postsPerPage = $_POST['postsPerPage'];
  $style = $_POST['style'];
  
  mysql_connect ("localhost", "user", "pass") or die ('Error: ' . mysql_error());
  mysql_select_db ("db");
  
  mysql_query("UPDATE settings SET postsPerPage = $postsPerPage WHERE id = '1'") or die(mysql_error());
  </code></pre>
  
  <p>The other update I want to include is:</p>
  
  <pre><code>mysql_query("UPDATE settings SET style = $style WHERE id = '1'") or die(mysql_error());
  </code></pre>
  
  <p>Thanks!</p>