Post by Xciso » Sun May 26, 2013 10:24 pm

I have worked with OpenCart for a few years now.
I have never used prefix for the database (like oc_). I know it can be good for hacking protection, but how good is this if i buy extension that need to insert tables to database.

Like say that i will install vQmod. This script require to make changes in db when i install it.
Will this go smooth or do i need to edit the files in every extension?


Active Member


Fri Jul 15, 2011 5:20 am

Post by ChetanCx » Mon May 27, 2013 1:36 am

depends on the developer of extension, if developer has enough knowledge of opencart he will make use $DB_PREFIX variable (defined in config.php) while making db queries. in my experience most of the extensions i have seen uses this variable. even if they don't use it you have to edit just a little bit of code.

User avatar
Active Member


Sat Dec 08, 2012 8:12 pm

Post by daik01 » Mon May 27, 2013 2:32 am

I think it is a must to use prefixes for database tables. Otherwise mysql keywords will be used as a table and can generate errors. I had one lately with one customer by using the Option table. With prefix it should be oc_option which is no problem.

TOP 5 Opencart Extensions:
1:Opencart Reservations
2:Stock Report, import/export stock levels with Excel
3:3D Carousel
4:Product Price Changer by Category
5:Set price Inclusive Taxes

Active Member


Sun Oct 21, 2012 3:18 am

Post by rph » Mon May 27, 2013 2:54 am

You enclose reserved words with backticks.


Expert Member


Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska
Who is online

Users browsing this forum: No registered users and 29 guests