Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.21 KB | None | 0 0
  1. CDbException
  2.  
  3. CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'comments.status' in 'where clause'. The SQL statement executed was: SELECT `tblComments`.`id` AS `t1_c0`, `tblComments`.`content` AS `t1_c1`, `tblComments`.`status` AS `t1_c2`, `tblComments`.`create_time` AS `t1_c3`, `tblComments`.`author` AS `t1_c4`, `tblComments`.`email` AS `t1_c5`, `tblComments`.`url` AS `t1_c6`, `tblComments`.`post_id` AS `t1_c7` FROM `tbl_comment` `tblComments` WHERE (comments.status=2) AND (`tblComments`.`post_id`=:ypl0) ORDER BY comments.create_time DESC
  4.  
  5. /var/www/surveyor/protected/views/post/view.php(20)
  6.  
  7. 08 <?php $this->renderPartial('_view', array(
  8. 09 'data'=>$model,
  9. 10 )); ?>
  10. 11
  11. 12 <div id="comments">
  12. 13 <?php if($model->commentCount>=1): ?>
  13. 14 <h3>
  14. 15 <?php echo $model->commentCount>1 ? $model->commentCount . ' comments' : 'One comment'; ?>
  15. 16 </h3>
  16. 17
  17. 18 <?php $this->renderPartial('_comments',array(
  18. 19 'post'=>$model,
  19. 20 'comments'=>$model->tblComments,
  20. 21
  21. 22 )); ?>
  22. 23 <?php endif; ?>
  23. 24
  24. 25 <h3>Leave a Comment</h3>
  25. 26
  26. 27 <?php if(Yii::app()->user->hasFlash('commentSubmitted')): ?>
  27. 28 <div class="flash-success">
  28. 29 <?php echo Yii::app()->user->getFlash('commentSubmitted'); ?>
  29. 30 </div>
  30. 31 <?php else: ?>
  31. 32 <?php $this->renderPartial('/comment/_form',array(
  32. Stack Trace
  33. #0
  34. + /var/www/yii/framework/db/CDbCommand.php(376): CDbCommand->queryInternal("fetchAll", array(2), array())
  35. #1
  36. + /var/www/yii/framework/db/ar/CActiveFinder.php(817): CDbCommand->queryAll()
  37. #2
  38. + /var/www/yii/framework/db/ar/CActiveFinder.php(526): CJoinElement->runQuery(CJoinQuery)
  39. #3
  40. + /var/www/yii/framework/db/ar/CActiveFinder.php(166): CJoinElement->lazyFind(Post)
  41. #4
  42. + /var/www/yii/framework/db/ar/CActiveRecord.php(258): CActiveFinder->lazyFind(Post)
  43. #5
  44. + /var/www/yii/framework/db/ar/CActiveRecord.php(126): CActiveRecord->getRelated("tblComments")
  45. #6
  46. – /var/www/surveyor/protected/views/post/view.php(20): CActiveRecord->__get("tblComments")
  47. 15 <?php echo $model->commentCount>1 ? $model->commentCount . ' comments' : 'One comment'; ?>
  48. 16 </h3>
  49. 17
  50. 18 <?php $this->renderPartial('_comments',array(
  51. 19 'post'=>$model,
  52. 20 'comments'=>$model->tblComments,
  53. 21
  54. 22 )); ?>
  55. 23 <?php endif; ?>
  56. 24
  57. 25 <h3>Leave a Comment</h3>
  58. #7
  59. + /var/www/yii/framework/web/CBaseController.php(119): require("/var/www/surveyor/protected/views/post/view.php")
  60. #8
  61. + /var/www/yii/framework/web/CBaseController.php(88): CBaseController->renderInternal("/var/www/surveyor/protected/views/post/view.php", array("model" => Post, "comment" => Comment), true)
  62. #9
  63. + /var/www/yii/framework/web/CController.php(866): CBaseController->renderFile("/var/www/surveyor/protected/views/post/view.php", array("model" => Post, "comment" => Comment), true)
  64. #10
  65. + /var/www/yii/framework/web/CController.php(779): CController->renderPartial("view", array("model" => Post, "comment" => Comment), true)
  66. #11
  67. – /var/www/surveyor/protected/controllers/PostController.php(54): CController->render("view", array("model" => Post, "comment" => Comment))
  68. 49 $comment=$this->newComment($post);
  69. 50
  70. 51 $this->render('view',array(
  71. 52 'model'=>$post,
  72. 53 'comment'=>$comment,
  73. 54 ));
  74. 55 }
  75. 56
  76. 57 /**
  77. 58 * Creates a new model.
  78. 59 * If creation is successful, the browser will be redirected to the 'view' page.
  79. #12
  80. + /var/www/yii/framework/web/actions/CInlineAction.php(50): PostController->actionView()
  81. #13
  82. + /var/www/yii/framework/web/CController.php(300): CInlineAction->runWithParams(array("r" => "post/view", "id" => "5", "title" => "Test final"))
  83. #14
  84. + /var/www/yii/framework/web/filters/CFilterChain.php(133): CController->runAction(CInlineAction)
  85. #15
  86. + /var/www/yii/framework/web/filters/CFilter.php(41): CFilterChain->run()
  87. #16
  88. + /var/www/yii/framework/web/CController.php(1122): CFilter->filter(CFilterChain)
  89. #17
  90. + /var/www/yii/framework/web/filters/CInlineFilter.php(59): CController->filterAccessControl(CFilterChain)
  91. #18
  92. + /var/www/yii/framework/web/filters/CFilterChain.php(130): CInlineFilter->filter(CFilterChain)
  93. #19
  94. + /var/www/yii/framework/web/CController.php(283): CFilterChain->run()
  95. #20
  96. + /var/www/yii/framework/web/CController.php(257): CController->runActionWithFilters(CInlineAction, array("accessControl"))
  97. #21
  98. + /var/www/yii/framework/web/CWebApplication.php(328): CController->run("view")
  99. #22
  100. + /var/www/yii/framework/web/CWebApplication.php(121): CWebApplication->runController("post/view")
  101. #23
  102. + /var/www/yii/framework/base/CApplication.php(155): CWebApplication->processRequest()
  103. #24
  104. – /var/www/surveyor/index.php(13): CApplication->run()
  105. 08 defined('YII_DEBUG') or define('YII_DEBUG',true);
  106. 09 // specify how many levels of call stack should be shown in each log message
  107. 10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
  108. 11
  109. 12 require_once($yii);
  110. 13 Yii::createWebApplication($config)->run();
  111. 2011-07-15 15:57:18 Apache/2.2.14 (Ubuntu) Yii Framework/1.1.7
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement