is this code efficient?
PHP Code:
while ($project_info = $DB_site->fetch_array($projects))
{
$project_info['text'] = nl2br(stripslashes($project_info['text']));
extract($project_info);
$time_posted = vbdate('n-j-y, g:i:s a', $timestamp);
// selects the number of times each confeession was rated
$number_of_rates = $DB_site->query_first("SELECT COUNT(*) AS votes
FROM project_rate
WHERE projectid = $projectid
");
$num_rates = number_format($number_of_rates['votes']);
// selects the username of the person who made the confeession
$who_done_it = $DB_site->query_first("SELECT username
FROM user
WHERE userid = $project_info[userid]
");