News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Unknown column 'b.member_groups' in 'where clause'

Started by jsx, May 08, 2022, 11:44:47 AM

Previous topic - Next topic

jsx

It cannot be done that way. After changing database prefix in admin panel in Server Settings > Database and Paths > Database Tables Prefix and in Settings.php file this information appears:

Table 'xxx_test.smf2_themes' doesn't exist

I just thought that after changing the database prefix it would automatically change in all tables, but it doesn't work that way.


Doug Heffernan

Quote from: jsx on May 18, 2022, 07:15:56 AMIt cannot be done that way. After changing database prefix in admin panel in Server Settings > Database and Paths > Database Tables Prefix and in Settings.php file this information appears:

Table 'xxx_test.smf2_themes' doesn't exist

I just thought that after changing the database prefix it would automatically change in all tables, but it doesn't work that way.



Did you change the prefix for all database tables as well? After you do that, you must update the Settings.php table with the same prefix that the database tables have.


jsx

Quote from: Doug Heffernan on May 18, 2022, 08:17:32 AMDid you change the prefix for all database tables as well?

Where exactly does the prefix change for all tables?

Arantor

You have to go rename the tables themselves. So if the table is smf_settings, the prefix is smf_ and if you change the prefix to mytable_ you need to go rename each of the tables to match, e.g. mytable_admin_info_files, mytable_boards, mytable_categories and so on.

Doug Heffernan

#24
Quote from: jsx on May 19, 2022, 08:41:10 AM
Quote from: Doug Heffernan on May 18, 2022, 08:17:32 AMDid you change the prefix for all database tables as well?

Where exactly does the prefix change for all tables?

You can change it for all the smf tables at once from phpmyadmin. To do so, first make a backup of your database, and then follow these steps:

1) Select the database that you have used to install your smf forum.

2) Select all the smf forum tables, if you have other tables for other scripts in that database. Otherwise you can select all the tables.

3) Click the 'With Slected' button at the bottom.

4) From the drop down options, Under Prefix, select the Add prefix to table and enter the desired prefix in the pop up screen that will be displayed. This is because from your previous posts, your tables do not have a prefix. If you had a prefix and wanted to change it, you should select the Replace table prefix option instead.

5) Enter the new prefix in the Settings.php file.

Hope it helps.

jsx

@Doug Heffernan

I did not think and did not even check that in phpMyAdmin I can change it so quickly. Thanks for the tip. Thanks for the help.

Doug Heffernan

Quote from: jsx on May 19, 2022, 09:29:51 AM@Doug Heffernan

I did not think and did not even check that in phpMyAdmin I can change it so quickly. Thanks for the tip. Thanks for the help.

You are welcome :)

Advertisement: