Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
how would a mod inherit the data for the phpbb3 mysql database? could it be I'm having problems because I'm trying to use mysqli? the error I'm getting is:
Fatal error: Call to undefined method mysqli::sql_close() in /var/www/localhost/htdocs/phpBB3/includes/functions.php on line 3487
Ok it came down to me having the variable names the same for both the inbuilt mysql and my mysqli functions... although if someone can tell me how to use the inbuilt functions I'd be grateful
I think that if you read those two pages of the code documentation (the DBAL class and the DBAL_Mysqli class), and if you look more closely at the code itself, you'll understand better the DBAL system
$sql = 'SELECT topic_title, forum_id, topic_id, topic_first_poster_name
FROM phpbb_topics';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
// are you sure you want to use printf here? the template system is way more powerful...
printf("%s (%s)\n", $row["topic_title"], $row["topic_first_poster_name"]);
}
$db->sql_freeresult($result);
if ($row['forum_id'] == 0 || $auth->acl_get('f_read', $row['forum_id']))
{
$template->assign_block_vars('latest_hot_topics', array(
'FULL_TITLE' => censor_text($row['topic_title']),
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']))
);
}
I've googled it but I can't work it out (I have php5 and mysql 5 with mysqli compiled in) I'm using rc7
Why are you including that file? thats not how to use the Database class... it’s declared automatically and should not be called directly. -- Therefore, take that line out and it will work.