why should left joins be bad?
but here, it's suggest a inner join
PHP Code:
$projects = $DB_site->query("
SELECT COUNT(*) AS votes, project_rate.projectid,
projects.text, projects.timestamp, user.username
FROM project_rate
INNER JOIN projects ON (project_rate.projectid = projects.projectid)
INNER JOIN user ON (user.userid = projects.userid)
$clause
GROUP BY project_rate.projectid
ORDER BY project_rate.projectid DESC
$limit
");
while ($project_info = $DB_site->fetch_array($projects))
{
$project_info['text'] = nl2br(stripslashes($project_info['text']));
$project_info['num_rates'] = number_format($project_info['votes']);
extract($project_info);
$time_posted = vbdate('n-j-y, g:i:s a', $timestamp);
that should work i think