Yii Framework Forum: Cdbexception - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Cdbexception Rate Topic: -----

#1 User is offline   Rupam 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 14-April 13

Posted 29 April 2013 - 05:29 AM

Hiii to all
I am newbie in Yii . actually when i try to connect my login form to data base its show
CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'doit.translation' doesn't exist. The SQL statement executed was: select message, translation from translation where language = :language and category = :category

C:\wamp\www\final\framework\db\CDbCommand.php(528)

516 return $result;
517 }
518 catch(Exception $e)
519 {
520 if($this->_connection->enableProfiling)
521 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
522 $errorInfo = $e instanceof PDOException ? $e->errorInfo : null;
523 $message = $e->getMessage();
524 Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
525 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
526 if(YII_DEBUG)
527 $message .= '. The SQL statement executed was: '.$this->getText().$par;
528 throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
529 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
530 }
531 }
532
533 /**
534 * Builds a SQL SELECT statement from the given query specification.
535 * @param array $query the query specification in name-value pairs. The following
536 * query options are supported: {@link select}, {@link distinct}, {@link from},
537 * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
538 * {@link limit}, {@link offset} and {@link union}.
539 * @return string the SQL statement
540 * @since 1.1.6


plz help me to solve this problem. THANKS
0

#2 User is offline   Fabrizio Caldarelli 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 618
  • Joined: 21-March 13
  • Location:Rome, Italy

Posted 29 April 2013 - 05:38 AM

CDbException is very clear: Table 'doit.translation' doesn't exist.

Check tableName() method in your model.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users