Web Hosting Talk







View Full Version : add table_prefix to DB


nmad
03-21-2004, 09:55 AM
Hello.
I have a phpbb board in use and in the DB i have all the tables name as

DB1
- table 1
- table 2

what i need to do is add a "table_prefix" in all the tables without loosing any information.

DB1
- phpbb_table1
- phpbb_table 2

Is that possible?

Thanks.

Brightadmin
03-22-2004, 05:30 AM
Hi

To modify the dbconf/mysql/*mysql files to
make use of the REAL_NAME option:

Database userdb userdb.txt dbi:mysql:whatever
Database userdb REAL_NAME ic_userdb
Database userdb ... ...
Database userdb ... ...
etc.

In this case, the Interchange facilities will continue to refer to the
table as 'userdb', but actual table used would be called 'ic_userdb'.

If you want to change in Phpbb board then please have a look into this URL for detailed information...

http://www.phpbb.com/phpBB/viewtopic.php?p=999846&highlight=

I hope this may work to resolve your problem.

Regards,

Bright:)

nmad
03-22-2004, 11:16 AM
Thanks for the reply.
I use "ALTER TABLE tablename1 RENAME tablename2;" for rename table bu table.
All works ok!
Thanks!