Welcome Guest, Not a member yet? Register   Sign In
database table name in CI
#1

[eluser]searain[/eluser]
http://ellislab.com/codeigniter/user-gui...guide.html

In the style guide,

Any tables that your add-on might use must use the 'exp_' prefix, followed by a prefix uniquely identifying you as the developer or company, and then a short descriptive table name. You do not need to be concerned about the database prefix being used on the user's installation, as ExpressionEngine's database class will automatically convert 'exp_' to what is actually being used.

This is for EE add on, will it be a good practice to use this name rule in CI coding?

Thanks!
#2

[eluser]Jondolar[/eluser]
Years ago, many web hosts only allowed one database per account so programmers needed to prefix their tables to allow website owners to be able to share one database with multiple applications. Most hosts now offer plenty of databases.

If your application has a really good chance of being extended or plugged into an existing app and needs to share data with existing apps, you might want to use table prefixes. Otherwise, if your app uses a different database (which most do imo) then you really don't need to do this nor do you need the overhead in your program.




Theme © iAndrew 2016 - Forum software by © MyBB