coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 (BBS) Integration / Bridging => Topic started by: Quinn on September 07, 2005, 03:38:06 AM

Title: There was an error while processing a database query.
Post by: Quinn on September 07, 2005, 03:38:06 AM
While executing query "SELECT user_id, username as user_name, user_level FROM `dbase_name`.phpbb_sessions INNER JOIN `dbase_name`.phpbb_users ON session_user_id = user_id WHERE session_id='b4685e6f73f607ff209a09f8d0c71f2c' AND session_user_id ='3' AND user_active='1'" on 0

mySQL error: Table 'dbase_name.phpbb_sessions' doesn't exist

While adding several boards to the site using a common database, I renamed the phpbb_session, phpbb_user, phpbb_groups tables to "session" "users" "groups" Setting constants.php to read the new table names.

Now the CPG doesn't work complaining about the table not existing... If I rename the tables it works but the other boards relying on the tables break.

Is there an easy  way to configure CPG look for the renamed tables too?
Title: Re: There was an error while processing a database query.
Post by: Azrayen on September 07, 2005, 05:34:11 AM
Hum hum,

You're on the standalone version support board... :-\\

My CPG isn't bridged with any board, so I didn't test this solution, bu if it may help :
In phpbb.inc.php search
define('PHPBB_TABLE_PREFIX', 'phpbb_'); // The prefix used for the DB tables

and replace it by
define('PHPBB_TABLE_PREFIX', ''); // The prefix used for the DB tables

since you don't have table prefix anymore.

Azy

PS : Let me (us) know if it's OK  ;)
Title: Re: There was an error while processing a database query.
Post by: Joachim Müller on September 07, 2005, 07:15:24 AM
moving this thread accordingly...
Title: Re: There was an error while processing a database query. (solved)
Post by: Quinn on September 07, 2005, 08:08:05 AM
Quote from: Azy on September 07, 2005, 05:34:11 AM
Hum hum,

You're on the standalone version support board... :-\\

My CPG isn't bridged with any board, so I didn't test this solution, bu if it may help :
In phpbb.inc.php search
define('PHPBB_TABLE_PREFIX', 'phpbb_'); // The prefix used for the DB tables

and replace it by
define('PHPBB_TABLE_PREFIX', ''); // The prefix used for the DB tables

since you don't have table prefix anymore.

Azy

PS : Let me (us) know if it's OK  ;)

Thanks, Azy... that fixed it!  ;)


// Prefix and names for the database tables
define('PHPBB_TABLE_PREFIX', ''); // The prefix used for the DB tables
define('PHPBB_USER_TABLE', 'users'); // The members table
define('PHPBB_SESSION_TABLE', 'sessions'); // The session table
define('PHPBB_GROUP_TABLE', 'groups'); // The groups table
define('PHPBB_UGROUP_TABLE', 'user_group'); // The group/user table


sorry about posting in the wrong forum... GauGau
Title: Re: There was an error while processing a database query. (solved)
Post by: Azrayen on September 08, 2005, 03:46:40 PM
Quote from: Quinn on September 07, 2005, 08:08:05 AM
Thanks, Azy... that fixed it!  ;)

OK, cool ! ;)