Im such a idiot

coolv1994

Member
Messages
508
Reaction score
0
Points
16
I feel really stupid right now because on my forum i just realized that i forgot to put on a prefix for about 130 tables of data. But are prefixes important?:dunno::nuts:
 

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
Depends - is anything else using that database besides the forum?


If no, then not really. All I can see the prefixes being nice for are people who have 1 database - you'd want prefixes on the tables so any other php/mysql stuff running on that database don't end up with conflicting table names (such as a front-page having the table user, and the forum having the table user - it can be done, but it'd be nasty if you installed a forum over that table).

If yes, you might wanna try and fix it unless you're damn sure nothing else on that database will ever use a table that has the same name as the forum - CMS's and Forums don't play nice together for instance.



A way around that though is if you install something later, make sure to give it a prefix. That way the forum could have a table labeled "user," and your CMS might have the table "joomla_user" :)
 

tittat

Active Member
Messages
2,478
Reaction score
1
Points
38
but it is always better to have prefix..so that you may use mor than one forums etc on a single database....
 

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
but it is always better to have prefix..so that you may use mor than one forums etc on a single database....

That's true, but at the same time he could still have more than one, so long as the REST have prefix's.

It's just gunna be a nightmare for organization :)
 

coolv1994

Member
Messages
508
Reaction score
0
Points
16
So far I have just a forum on that database but is there a way to add prefixes?
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
yeah, i think you can just mass edit all the table names. or export the database, change the table names, and import it again.
 

nexhunter

New Member
Messages
239
Reaction score
1
Points
0
it would be wise to edit and add the prefixes but then you'll have to make sure your scripts code look for the new tables names not the old names.
 
Last edited:

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
it would be wise to edit and add the prefixes but then you'll have to make sure your scripts code look for the new tables names not the old names.

That should be somewhere in the configuration too :)


It's definitely wiser to do the mass-edit though - pretty damn sure if you did a backup of the database, that it'd take the table names with it - reinstalling it would work just fine, but as soon as you tried to import the backup, it'd either re-create the useless tables, or it'd throw errors for trying to insert data into non-existent ones.

Better off editing and updating configuration like nexhunter's suggesting.
 
Top