Jump to content
Sign in to follow this  
eramge11

Does anyone know about this error?

Recommended Posts

Does anyone know why I would be getting this error all of a sudden when I never got it before? I didn't do anything different and nothing was deleted.

 

CDbException

 

CDbCommand failed to execute the SQL statement: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mccombpo_data.t' doesn't exist

Share this post


Link to post
Share on other sites

That is not a standard php error. Both CDbException & CDbCommand are part of your code base.

Share this post


Link to post
Share on other sites

Or it's from Yii: http://www.yiiframework.com/doc/api/1.1/CDbCommand

 

It is looking for a table named "t" in the database mccombpo_data, but there is no table (or view) by that name in the database. If there is supposed to be a table with the name "t", then you have either a configuration problem or a database schema problem. If you're not supposed to have a table named "t", I'm guessing a query is messed up somewhere, like you wanted to do this:

 

 

SELECT t.id FROM toys t WHERE t.manufacturer='Hasbro'

 

but you forgot the table name in the alias attempt:

 

 

SELECT t.id FROM t WHERE t.manufacturer='Hasbro'

 

If this is framework code, that makes it a little more difficult to figure out. You might need to turn up logging to get more information as to where it's happening so as to determine why it is.

Share this post


Link to post
Share on other sites

Check to make sure that the table mccombpo_data exists in the database, and that the file /models/mccombpo_data.php is on the server.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.