Fatal Error in Gdn_Database.Query();

Unknown column 'w.Bookmarked' in 'where clause'

select d.Type as `Type`, d.InsertUserID as `FirstUserID`, d.DateInserted as `FirstDate`, d.CountBookmarks as `CountBookmarks`, d.Body as `Body`, d.Format as `Format`, d.DateLastComment as `LastDate`, d.LastCommentUserID as `LastUserID`, ca.Name as `Category`, ca.UrlCode as `CategoryUrlCode`, ca.PermissionCategoryID as `PermissionCategoryID`, d.*, 0 as `WatchUserID`, now() as `DateLastViewed`, 0 as `Dismissed`, 0 as `Bookmarked`, 0 as `CountCommentWatch`, d.Announce as `IsAnnounce` from GDN_Discussion d left join GDN_Category ca on d.CategoryID = ca.CategoryID where d.CategoryID in ('16', '14', '15') and w.Bookmarked = :wBookmarked and w.UserID = :wUserID order by d.DateLastComment desc limit 30

The error occurred on or near: /var/www/vhosts/mysignpost.org/httpdocs/forum/library/database/class.database.php

276: 
277:          if (!is_object($PDOStatement)) {
278:             trigger_error(ErrorMessage('PDO Statement failed to prepare', $this->ClassName, 'Query', $this->GetPDOErrorMessage($this->Connection()->errorInfo())), E_USER_ERROR);
279:          } else if ($PDOStatement->execute($InputParameters) === FALSE) {
280:             trigger_error(ErrorMessage($this->GetPDOErrorMessage($PDOStatement->errorInfo()), $this->ClassName, 'Query', $Sql), E_USER_ERROR);
281:          }
282:       } else {
283:          $PDOStatement = $this->Connection()->query($Sql);
284:       }

Backtrace:

/var/www/vhosts/mysignpost.org/httpdocs/forum/library/database/class.database.phpPHP::Gdn_ErrorHandler();
[/var/www/vhosts/mysignpost.org/httpdocs/forum/library/database/class.database.php:280] PHP::trigger_error();
[/var/www/vhosts/mysignpost.org/httpdocs/forum/library/database/class.sqldriver.php:1648] Gdn_Database->Query();
[/var/www/vhosts/mysignpost.org/httpdocs/forum/library/database/class.sqldriver.php:673] Gdn_SQLDriver->Query();
[/var/www/vhosts/mysignpost.org/httpdocs/forum/applications/vanilla/models/class.discussionmodel.php:178] Gdn_SQLDriver->Get();
[/var/www/vhosts/mysignpost.org/httpdocs/forum/applications/vanilla/controllers/class.discussionscontroller.php:193] DiscussionModel->Get();
[/var/www/vhosts/mysignpost.org/httpdocs/forum/applications/vanilla/controllers/class.discussionscontroller.php:193] DiscussionsController->Bookmarked();
[/var/www/vhosts/mysignpost.org/httpdocs/forum/library/core/class.dispatcher.php:299] PHP::call_user_func_array();
[/var/www/vhosts/mysignpost.org/httpdocs/forum/index.php:53] Gdn_Dispatcher->Dispatch();

Variables in local scope:

[Sql] 'select d.Type as `Type`, d.InsertUserID as `FirstUserID`, d.DateInserted as `FirstDate`, d.CountBookmarks as `CountBookmarks`, d.Body as `Body`, d.Format as `Format`, d.DateLastComment as `LastDate`, d.LastCommentUserID as `LastUserID`, ca.Name as `Category`, ca.UrlCode as `CategoryUrlCode`, ca.PermissionCategoryID as `PermissionCategoryID`, d.*, 0 as `WatchUserID`, now() as `DateLastViewed`, 0 as `Dismissed`, 0 as `Bookmarked`, 0 as `CountCommentWatch`, d.Announce as `IsAnnounce`
from GDN_Discussion d
left join GDN_Category ca on d.CategoryID = ca.CategoryID
where d.CategoryID in (\'16\', \'14\', \'15\')
 and w.Bookmarked = :wBookmarked
 and w.UserID = :wUserID
order by d.DateLastComment desc
limit 30'
[InputParameters] array (
  ':wBookmarked' => '1',
  ':wUserID' => 0,
)
[Options] array (
  'ReturnType' => 'DataSet',
)
[ReturnType] 'DataSet'
[PDOStatement] array (
  'queryString' => 'select d.Type as `Type`, d.InsertUserID as `FirstUserID`, d.DateInserted as `FirstDate`, d.CountBookmarks as `CountBookmarks`, d.Body as `Body`, d.Format as `Format`, d.DateLastComment as `LastDate`, d.LastCommentUserID as `LastUserID`, ca.Name as `Category`, ca.UrlCode as `CategoryUrlCode`, ca.PermissionCategoryID as `PermissionCategoryID`, d.*, 0 as `WatchUserID`, now() as `DateLastViewed`, 0 as `Dismissed`, 0 as `Bookmarked`, 0 as `CountCommentWatch`, d.Announce as `IsAnnounce`
from GDN_Discussion d
left join GDN_Category ca on d.CategoryID = ca.CategoryID
where d.CategoryID in (\'16\', \'14\', \'15\')
 and w.Bookmarked = :wBookmarked
 and w.UserID = :wUserID
order by d.DateLastComment desc
limit 30',
)

Need Help?

If you are a user of this website, you can report this message to a website administrator.

If you are an administrator of this website, you can get help at the Vanilla Community Forums.

Additional information for support personnel: