Skip to content

Instantly share code, notes, and snippets.

@erikfrerejean
Created May 30, 2011 15:08
Show Gist options
  • Save erikfrerejean/999031 to your computer and use it in GitHub Desktop.
Save erikfrerejean/999031 to your computer and use it in GitHub Desktop.
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './forum/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
// Selecteer het topic
$topic_ids = array(
6,
);
$sql_ary = array(
'SELECT' => 'p.*'
'FROM' => array(
POSTS_TABLE => 'p',
),
'WHERE' => $db->sql_in_set('p.topic_id', $topic_ids),
);
$sql = $db->sql_build_query('SELECT', $sql_ary);
$result = $db->sql_query($sql);
$topic_posts = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment