Web应用程序中的数据库前缀是什么? [英] What is a database prefix in web applications?

查看:114
本文介绍了Web应用程序中的数据库前缀是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我正在进行搜索引擎优化.

Currently I am working with search engine optimization.

我对数据库有问题,即:

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

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

我知道数据库名称,主机名,密码.但是在开放源代码中,他们提到的是PREFIX行.

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?

谢谢.

推荐答案

通常,这表示多租户应用程序(共享一个数据库的应用程序)中表名的前缀,以避免名称冲突.

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

说,Wordpress表将以wp_*开头,Mantis表将以mantis_等开头.

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.

如果您的数据库仅由一个应用程序使用,则可以选择所需的任何前缀,将其保留为空,或者最好使用它的应用程序名称,例如PHPDIG_.

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.

这篇关于Web应用程序中的数据库前缀是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆