nancy
nancy

Reputation: 49

What is a database prefix in web applications?

Currently I am working with search engine optimization.

I have a problem with db, i.e.:

define('PHPDIG_DB_PREFIX','<dbprefix>'); 

I know the db name, host name, password. But in an open source they are mentiong that PREFIX line.

I'm just confused. What should I use for prefix?

Thanks.

Upvotes: 2

Views: 18683

Answers (2)

Quassnoi
Quassnoi

Reputation: 425241

Usually this means a prefix for the table names in multi-tenant applications (those sharing one database) to avoid name conflicts.

Say, Wordpress tables will start with wp_*, Mantis ones with mantis_ etc.

You didn't mention what exactly was your problem, so I cannot tell you which prefix should you use.

If your database is only used by one application, you can pick any prefix you want, just leave it empty, or, best, use the application name for it, like PHPDIG_.

If the database is used by other applications, you should pick a prefix which does not conflict with those used by the other applications.

If you are using an existing database installation, you should fill the prefix used by this installation.

Upvotes: 7

Nanne
Nanne

Reputation: 64399

I agree that you are abit confusing :) Having said that: Sometimes you have a db-prefix If you don't have that. leave it empty.

Upvotes: 3

Related Questions