title: adding a where clause to show column data to that id?
body: <p>i am trying to echo out the value of 'read_forum' for each row / each sperate 'id' in the row.</p>
  
  <p>so for example:</p>
  
  <pre><code>id  |  read_forum(views)  |  content  |
  
  1          30          hello
  2          45          bored
  3          34          something
  </code></pre>
  
  <p>so on my page i would have:</p>
  
  <pre><code>id 1 content: hello     30 views 
  id 2 content: bored     45 views
  </code></pre>
  
  <p>and so on.</p>
  
  <p>so basically my question is how do i put a where clause in my sql statement to say echo out id 1's views with id 1 and echo id 2's views out with id 2 all seperately.</p>
  
  <p>i hope im making myself clear. hope someone can help thanks.</p>
  
  <pre><code>function check_new_forum2($forum) {
              global $connection;
              global $_SESSION;
              $query = "SELECT read_forum FROM ptb_forum WHERE id=$forum
          ";
              $check_new_forum_set2 = mysql_query($query, $connection);
              confirm_query($check_new_forum_set2);
              return $check_new_forum_set2;       
          }
  </code></pre>