|
From: Jon O. <jon...@us...> - 2007-05-16 19:41:27
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/modules In directory sc8-pr-cvs16:/tmp/cvs-serv14409/modules Modified Files: pa_search.php pa_toplist.php Log Message: Wrong LEFT JOIN syntax Index: pa_toplist.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_toplist.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** pa_toplist.php 13 Aug 2006 19:44:45 -0000 1.22 --- pa_toplist.php 16 May 2007 19:41:22 -0000 1.23 *************** *** 216,220 **** default: $sql = "SELECT f1.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, c.cat_id, c.cat_name, COUNT(cm.comments_id) AS total_comments, c.cat_name, c.cat_allow_ratings, c.cat_allow_comments ! FROM " . PA_FILES_TABLE . " AS f1, " . PA_CATEGORY_TABLE . " AS c LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file LEFT JOIN " . USERS_TABLE . " AS u ON f1.user_id = u.user_id --- 216,220 ---- default: $sql = "SELECT f1.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, c.cat_id, c.cat_name, COUNT(cm.comments_id) AS total_comments, c.cat_name, c.cat_allow_ratings, c.cat_allow_comments ! FROM " . PA_CATEGORY_TABLE . " AS c, " . PA_FILES_TABLE . " AS f1 LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file LEFT JOIN " . USERS_TABLE . " AS u ON f1.user_id = u.user_id *************** *** 416,420 **** default: $sql = "SELECT f1.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, c.cat_id, c.cat_name, c.cat_allow_ratings, c.cat_allow_comments ! FROM " . PA_FILES_TABLE . " AS f1, " . PA_CATEGORY_TABLE . " AS c LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file LEFT JOIN " . USERS_TABLE . " AS u ON f1.user_id = u.user_id --- 416,420 ---- default: $sql = "SELECT f1.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, c.cat_id, c.cat_name, c.cat_allow_ratings, c.cat_allow_comments ! FROM " . PA_CATEGORY_TABLE . " AS c, " . PA_FILES_TABLE . " AS f1 LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file LEFT JOIN " . USERS_TABLE . " AS u ON f1.user_id = u.user_id Index: pa_search.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_search.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** pa_search.php 13 Aug 2006 19:44:45 -0000 1.20 --- pa_search.php 16 May 2007 19:41:22 -0000 1.21 *************** *** 490,494 **** default: $sql = "SELECT f1.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, c.cat_id, c.cat_name, COUNT(cm.comments_id) AS total_comments ! FROM " . PA_FILES_TABLE . " AS f1, " . PA_CATEGORY_TABLE . " AS c LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file LEFT JOIN " . USERS_TABLE . " AS u ON f1.user_id = u.user_id --- 490,494 ---- default: $sql = "SELECT f1.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, c.cat_id, c.cat_name, COUNT(cm.comments_id) AS total_comments ! FROM " . PA_CATEGORY_TABLE . " AS c, " . PA_FILES_TABLE . " AS f1 LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file LEFT JOIN " . USERS_TABLE . " AS u ON f1.user_id = u.user_id |