title: JOIN on three tables is not working
body: <p>I have these three tables, <code>user</code>, <code>categories</code> and <code>files</code></p>
  
  <p>In <code>users</code>, table I have a column <code>user_id</code></p>
  
  <p><img src="https://i.stack.imgur.com/QCq0m.jpg" alt="enter image description here"></p>
  
  <p>And I have this query that shows all Categories.</p>
  
  <pre><code>SELECT
      `categories`.`category_id`, `categories`.`timestamp`,`categories`.`name`,       
      LEFT(`categories`.`description`, 50) as `description`,
      COUNT(`files`.`file_id`) as `file_count`
  FROM `categories`
  LEFT JOIN `files`
      ON `categories`.`category_id` = `files`.`category_id`
  GROUP BY `categories`.`category_id`
  </code></pre>
  
  <p>What I want to do is that to show only categories which are created by specific user.
  Adding a <code>WHERE user.user_id = categories.category_id</code> gives </p>
  
  <blockquote>
    <p>Unknown column users.user_id</p>
  </blockquote>