I have this query which pulls records from two tables and works correctly.
Is there a way to add a third table (comments) so as to count the number of comments for an article.? Comments table has a foreign key artid with jt_articles primary key id.
Thank you
$query = "SELECT M.id,M.j_surname,A.j_user_id,A.id,A.jart_title, A.jart_description, A.jart_createddate FROM jt_articles A, jt_members M where M.id = A.j_user_id ORDER BY A.jart_createddate DESC LIMIT $offset, $recordsPerPage;"; # 1. Main query
$result = mysql_query($query) or die('Mysql Err. 1');