blog demo from 1.1.0

i got this error when i run blog demo from r1700:



CDbCommand failed to execute the SQL statement: CDbCommand failed to prepare the SQL statement: SQLSTATE[HY000]: General error: 1 no such column: t.status

Source File


00363: }


00365: if($this->_connection->enableProfiling)

00366: Yii::endProfile(‘system.db.CDbCommand.query(’.$this->getText().’)’,‘system.db.CDbCommand.query’);


00368: return $result;

00369: }

00370: catch(Exception $e)

00371: {

00372: if($this->_connection->enableProfiling)

00373: Yii::endProfile(‘system.db.CDbCommand.query(’.$this->getText().’)’,‘system.db.CDbCommand.query’);

00374: Yii::log('Error in querying SQL: '.$this->getText().$par,CLogger::LEVEL_ERROR,‘system.db.CDbCommand’);

00375: throw new CDbException(Yii::t(‘yii’,‘CDbCommand failed to execute the SQL statement: {error}’,

00376: array(’{error}’=>$e->getMessage())));

00377: }

00378: }

00379: }

Stack Trace

#0 C:\xampp\framework\db\CDbCommand.php(265): CDbCommand->queryInternal(‘fetchAll’, 2, Array)

#1 C:\xampp\framework\db\ar\CActiveFinder.php(702): CDbCommand->queryAll()

#2 C:\xampp\framework\db\ar\CActiveFinder.php(394): CJoinElement->runQuery(Object(CJoinQuery))

#3 C:\xampp\framework\db\ar\CActiveFinder.php(73): CJoinElement->find(Object(CDbCriteria))

#4 C:\xampp\framework\db\ar\CActiveFinder.php(101): CActiveFinder->query(Object(CDbCriteria), true)

#5 C:\xampp\htdocs\blog\protected\models\Comment.php(130): CActiveFinder->findAll(Array)

Sorry, same problem for me since r1700 whereas it works well on yii-1.0.11.


CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown column '' in 'on clause'

I still don’t know where to start.

You should use Yii 1.1.0 together with the blog demo 1.1. From your call stack, I think you are using an older version of Yii.

Flavio, I wrote here upgrading-1-0-11-to-1-1-0-cdbcommand-failed how I solved my migration from r1700 to 1.1.0.

Hope it helps.