Tag Archives: zfpress

Adding prefix to tables with Zend_Db

I was working on my ZFPress project which is a clone of WordPress but in Zend Framework. And one of the features was to add a prefix to the tables. So i looked around but couldnt find any real solution to this. This is what i came up with.

What you would do is extending your tables with the abstract class and use them as you would normally. It’ll then automatically add your prefix from your app.ini if it exists.