Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9250087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:21:50+00:00 2026-06-18T10:21:50+00:00

Im trying to intergrate phpbb3 with code igniter. im pretty successful but im tryying

  • 0

Im trying to intergrate phpbb3 with code igniter. im pretty successful but im tryying to access the forum database and it not working. This is currently what I have in my database file.

/** FORUM DATABASE **/

$active_group = 'forum';
$active_record = TRUE;

$db['forum']['hostname'] = 'localhost';
$db['forum']['username'] = 'root';
$db['forum']['password'] = 'root';
$db['forum']['database'] = 'phpbb';
$db['forum']['dbdriver'] = 'mysqli';
$db['forum']['dbprefix'] = 'phpbb';
$db['forum']['pconnect'] = FALSE;
$db['forum']['db_debug'] = TRUE;
$db['forum']['cache_on'] = FALSE;
$db['forum']['cachedir'] = '';
$db['forum']['char_set'] = 'utf8';
$db['forum']['dbcollat'] = 'utf8_general_ci';
$db['forum']['swap_pre'] = '';
$db['forum']['autoinit'] = TRUE;
$db['forum']['stricton'] = TRUE;

/** CMS DATABASE **/
$active_group = 'default';
$active_record = TRUE;

$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'root';
$db['default']['password'] = 'root';
$db['default']['database'] = 'cms';
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = FALSE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = TRUE;

And here is a method that is trying to access the database. It keeps returning null.

public function getUserGroupMembership()
{
  $forum = $this->load->database('forum',TRUE);
  global $table_prefix;
  $userId = $this->_user->data['user_id'];
  $this->forum->select('g.group_name');
  $this->forum->from($table_prefix . 'groups g');
  $this->forum->from($table_prefix . 'user_group u');
  $this->forum->where('u.user_id', $userId);
  $this->forum->where('u.group_id', 'g.group_id', FALSE);
  $query = $this->forum->get();
  foreach ($query->result_array() as $group)
  {
      $groups[] = $group['group_name'];
  }
  return $groups;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T10:21:51+00:00Added an answer on June 18, 2026 at 10:21 am

    The database object is loaded in the $forum variable, but the $this->forum variable is used to interact with the database. It’s not going to work as $forum is a local variable and $this->forum is an class variable, they aren’t the same. To fix your code, you should change $forum to $this->forum or $this->forum to $forum. You can not use both at the same time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to integrate Facebook sharing into a webpage using this code edited from
I am trying to intergrate phpbb3 with my site, I have managed to do
i am trying to intergrate the jquery progress bar but i am getting issues.
Im trying to integrate Brad Larson's GPUImage framework to my project. The sample code
I'm trying to integrate passport into my nodejs server using connect, but can't seem
I'm trying integrate spring with hibernate but catch exception on project start. Caused by:
I'm trying integrate spring with hibernate but catch NamingException: Context is read only stacktrace
I'm trying to integrate Kryonet within a Slick2D game with the assistance of this
I am trying to integrate Flurry analytics 4.1.0 into my iPhone application, but I
I'm trying to intergrate the fckeditor filemanager into the newest ckeditor. I'm following a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.