Jump to content

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

Link to comment
https://forums.phpfreaks.com/topic/292203-does-anyone-know-about-this-error/
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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.