public static function getNoteCommentsForNote($pack) { $sql_note_comments = dbconnection::queryArray("SELECT note_comments.*, users.user_name, users.display_name FROM note_comments LEFT JOIN users ON note_comments.user_id = users.user_id WHERE game_id = '{$pack->game_id}' AND note_id = '{$pack->note_id}' ORDER BY note_comments.created ASC"); $note_comments = array(); for ($i = 0; $i < count($sql_note_comments); $i++) { if (!($ob = note_comments::noteCommentObjectFromSQL($sql_note_comments[$i]))) { continue; } $note_comments[] = $ob; } return new return_package(0, $note_comments); }