You are here

function activity_comments_load in Activity 6

Load comments saved to a particular activity.

Parameters

$aid: The activity ID to look for comments for.

Return value

$comments An array of comments found (possibly empty).

2 calls to activity_comments_load()
activity_get_activity in ./activity.module
API function.
activity_load in ./activity.module

File

./activity.module, line 1157
activity.module

Code

function activity_comments_load($aid) {
  $comments = array();
  $results = db_query('SELECT ac.*, u.name, u.picture FROM {activity_comments} ac LEFT JOIN {users} u ON (u.uid = ac.uid) WHERE ac.aid = %d', $aid);
  while ($result = db_fetch_object($results)) {
    $comments[] = $result;
  }
  return $comments;
}