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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

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   2647 Views


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 .


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.