Magento 1.9 – Fixing SQLSTATE[42S02] Base Table or View Not Found Error

magento-1.9

My magento database is created using table prefix.
After installing extension the table is created with prefix.
But while using the extension to save the data it throws exception as
"SQLSTATE[42S02]: Base table or view not found: 1146 Table (databasename.without prefix table name) doesn't exist"
for extension but the table name is present with prefix.
How to resolve it.
Where to make changes since in many of the extension it throws the same error.

Best Answer

This is likely because the installation script that installed this table hardcoded the script. Something like install-x.x.x.php instead of $this->getTable('.../...').

So, check all of your extensions' sql directory scripts and confirm that the table names are hardcoded. If that's the case, you'll have to just update your table names with your prefix included.

Related Topic