title: It won't echo out the columns from database
body: <p>When I am trying to choose t1 column 1 and t2 column 2 from database, it won't echo it out, can anyone tell me if this line is wrong?</p>
  
  <pre><code>$query_category = "SELECT recipedia_categories.category_name, recipedia_recipies.category 
  FROM recipedia_categories 
  INNER JOIN category 
  ON recipedia_categories.ID=recipedia_recipies.category_ID";
  $result_category = $db-&gt;query($query_category);
  while ($row_category = $result_category-&gt;fetch_assoc()) {
      $cat_name = $row_category['category_name'];
  }
  </code></pre>
  
  <p>and in HTML I am using </p>
  
  <pre><code>&lt;?=$cat_name;?&gt;
  </code></pre>
  
  <p>When using the fetch_assoc it gives me an error</p>
  
  <blockquote>
    <p>Fatal error: Call to a member function fetch_assoc() on boolean</p>
  </blockquote>
  
  <p>I hope someone can tell me what's wrong here :)</p>