Hi,
I’ve been away from yii for a while and have just resurrected some old projects, and have plugged them into 1.1.4.
I immediately tripped over the ‘t’ issue noted here: http://code.google.com/p/yii/issues/detail?id=796 quite a lot.
I really should know better than commenting, but this is a daft solution to the problem. But I guess it’s there now, so I have to fix tons of stuff. w00t!
Anyway, I now get the following error:
CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation:
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
for the right syntax to use near '??.createTime' at line 1
Here’s the SQL that’s generated:
SELECT `comments`.`id` AS `t1_c0`, `comments`.`content` AS `t1_c1`, `comments`.`contentDisplay`
AS `t1_c2`, `comments`.`status` AS `t1_c3`, `comments`.`createTime` AS `t1_c4`, `comments`.`author`
AS `t1_c5`, `comments`.`email` AS `t1_c6`, `comments`.`url` AS `t1_c7`, `comments`.`postId`
AS `t1_c8` FROM `Comment` `comments` WHERE (`comments`.`postId`=:ypl0) ORDER BY ??.createTime
which, from the stack trace:
#6 /home/marc/public_html/yii_blog/protected/controllers/PostController.php(60): CActiveRecord->__get('comments')
is generated by:
00060: $this->render('show', array('post' => $post, 'comments' => $post->comments, 'newComment' => $comment));
Why? What has changed to make this happen?
Thanks.