title: Changing css depending on SQL value
body: <p>I'm new to both php and jquery, and i'm trying to create a webpage which shows players and it's status based on data from my Mysql server.</p>
  
  <p>The base code works, although the code scraped together from multiple youtube tutorials :)</p>
  
  <p>I would like to change the opacity of a player's row when it's status is, or becomes 0 (dead).</p>
  
  <p>This is the code i have so far :</p>
  
  <p>pagetest.php:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;pagetest&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;table id="show"&gt;
    &lt;tr&gt;
      &lt;td&gt;player&lt;/td&gt;
      &lt;td&gt;status&lt;/td&gt;
    &lt;/tr&gt;
    &lt;/table&gt;
    &lt;script type="text/javascript" src="../jquery.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
      $(document).ready(function() {
        setInterval(function() {
          $('#show').load('test.php')
        }, 3000);
      });
    &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>test.php :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;test&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;?php
  
    $conn = mysqli_connect("myserver", "myuser", "mypass", "mydb");
    if ($conn-&gt; connect_error) {
      die("Connection failed:". $conn-&gt;connect_error);
    }
  
    $sql = "SELECT player, status FROM mytable";
    $result = $conn-&gt;query($sql);
  
    if ($result-&gt; num_rows &gt; 0) {
      while ($row = $result-&gt;fetch_assoc()){
        echo "&lt;tr&gt;&lt;td&gt;" . $row["player"] . "&lt;/td&gt;&lt;td&gt;" . $row["status"] . "&lt;/td&gt;&lt;/tr&gt;";
      }
      echo "&lt;/table&gt;";
    }
    else {
      echo "No game data available";
    }
    ?&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I'd really appreciate your help :)</p>