title: MySQL Select with Inner Join, Limit only first
body: <p>i need paginate a posts from my data base, i write the next query:</p>
  
  <pre><code>SELECT posts.ID, posts.date, comments.name, comments.value 
  FROM posts 
  INNER JOIN comments 
      ON comments.ID = posts.ID 
  INNER JOIN relations 
      ON relations.ID = posts.ID 
  WHERE type_rel=1 AND status_post=1 AND 
  LIMIT 0,10
  </code></pre>
  
  <p>The problem is in the LIMIT sentence, i need limit only the "posts" table.</p>
  
  <p>The comments table have many rows and if i put the limit in "0,10", the "posts" table limited to 10 posts, but the comments table also limited to 10.</p>
  
  <p>Someone have a solution to my problem? i use this in PHP query.</p>
  
  <p>Sorry for my bad english, thanks in advance.</p>