Himadri
Himadri

Reputation: 3012

Is it advisible to add new table in Joomla?

I need to know if it is advisible to add new table in default database of Joomla. Will it be preserved if I update my Joomla.

If yes, then can anybody describe the steps?

Upvotes: 0

Views: 1460

Answers (4)

Stefan Morrow
Stefan Morrow

Reputation: 101

as everybody said adding tables will not be affected by Joomla upgrades unless they decide to name a new table the same as yours. A table "name" could also clash with another extension that you want to install so it would be good advise to spend some time thinking on a name that will make sure is unique to your use or component.

Of course if this is a one-off custom thing then it matters less.

If you are looking for a more in-depth tutorial try this YouTube Video: http://www.youtube.com/watch?v=twT3q7dyVpI

Upvotes: 1

Arno
Arno

Reputation: 447

As already said, you can add any table you like to your Joomla database. Joomla doesn't care for tables it doesn't know. And those extra tables are not modified by an update. BUT keep two things in mind: 1. If you make backups of your database with a joomla extension (such as lazyBackup) and you want to backup your extra-tables too, then make sure to include these extra tables by choosing the appropriate options in the backup extension. By default those extra table might not be included in your backup. 2. As you can easily see in phpMyAdmin all joomla tables start with a prefix such as he3ie_. This prefix is different on every joomla installation (if you did not choose your own). It is no good idea to start your extra tables with this prefix. This might collide with joomla-tables which could be created in the future (by joomla or by an extension).

Upvotes: 1

atpatil11
atpatil11

Reputation: 433

Joomla update doesn't disturb your custom database tables or any other data. Just create the database as you want like phpmyadmin etc & use it without any fear.

Upvotes: 0

Lodder
Lodder

Reputation: 19733

Yes, you can add custom database tables if you wish, it doesn't pose any threats. Just make sure you use Joomla coding standards when getting or adding data from the table. More information on that can be found here:

http://docs.joomla.org/J2.5:Accessing_the_database_using_JDatabase

As for updating Joomla, yes, the table will be preserved.

Hope this helps

Upvotes: 2

Related Questions