title: query: cross product instead of join
body: <p>I have two tables that I would like to join but I am getting an error from MySQL</p>
  
  <pre><code>Table: books
  bookTagNum ShelfTagNum
  book1      1
  book2      2
  book3      2
  
  Table: shelf
  shelfNum   shelfTagNum
  1          shelf1
  2          shelf2
  </code></pre>
  
  <p>I want my results to be:</p>
  
  <pre><code>bookTagNum ShelfTagNum shelfNum
  book1      shelf1           1
  book2      shelf2           2
  book3      shelf2           2
  </code></pre>
  
  <p>but instead I am also getting an extra result:</p>
  
  <pre><code>book1      shelf2           2
  </code></pre>
  
  <p>I think my query is doing a cross product instead of a join:</p>
  
  <pre><code>SELECT `books`.`bookTagNum` , `books`.`shelfNum` , `shelf`.`shelfTagNum` , `books`.`title`
  FROM books, shelf
  where `books`.`shelfNum`=`books`.`shelfNum`
  ORDER BY `shelf`.`shelfTagNum` ASC
  LIMIT 0 , 30
  </code></pre>
  
  <p>What am I doing wrong?</p>