title: SELECT data and COUNT comments in other mySql table
body: <p>Hi there and thanks for looking into this.</p>
  
  <p>I have the following query at this moment:</p>
  
  <pre><code>SELECT videos.video_genre_id, videos.username, videos.title, videos.slugTitle, videos.link, videos.tags, videos.date_added, video_genre.video_genre_id, video_genre.video_genre
  
  FROM videos, video_genre
  WHERE videos.accepted = 'y'
  AND videos.video_genre_id = video_genre.video_genre_id
  ORDER BY  videos.date_added DESC
  </code></pre>
  
  <p>Working fine. But I want to count the total comments for each video. I have another table named "video_comments" with the following fields:</p>
  
  <pre><code>video_comments_id 
  videos_id 
  comment
  </code></pre>
  
  <p>What is the best solution to use one query and get the total comments for each video? I never user COUNT before, so I don't know where to start.</p>
  
  <p>Thanks in advance.</p>
  
  <p>Edit:</p>
  
  <p>The table "videos" has the field "videos_id" as the primary field.</p>
  
  <p>Edit 2:</p>
  
  <p>I think I got the answer:</p>
  
  <pre><code>    SELECT (select count(*) from video_comments AS total), videos.video_genre_id, videos.username, videos.title, videos.slugTitle, videos.link, videos.tags, videos.date_added, video_genre.video_genre_id, video_genre.video_genre
  FROM videos, video_genre
  WHERE videos.accepted = 'y'
  AND videos.video_genre_id = video_genre.video_genre_id
  ORDER BY  videos.date_added DESC
  </code></pre>
  
  <p>Only problem is that I can't seem to get "total" as a row to show the total comments.</p>