Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

table prefix in database


Go to End


2 Posts   2810 Views

Avatar
neothinkx

Community Member, 1 Post

30 October 2008 at 10:46pm

Hi.i just downloaded silverstripe.It is good CMS.I installed it on my local system and it installed without any error.Now i want to install on my webhost but problem is that i am allowed only to have one database.I want to prefix silverstripe tables with ss_. i have done this with zencart because that had an option during installation.but there is no such option while installing silverstripe.I know it can be done by modifying some code but do not know exactly where.i tried to find but got confused.please help .
thanks

Avatar
Hamish

Community Member, 712 Posts

5 November 2008 at 9:13am

A hacky way of doing it might be to modify MySQLDatabase.php (sapphire/core/model/) - wherever there is an SQL query with $table or $tableName, prefix it with whatever you want. I haven't tried it and you'd have to be careful with future upgrades, but it might be a temporary fix for your situation.