vanillaforums/Garden — Issue #1170: Unknown column 'd.DiscussionID' in 'on clause' tagging 1.1 v2.0.18rc2
Author: camosreptiles
Created: 2011-10-22 17:35:16+00:00
State: open

Getting This error when clicking Tags links in 'popular tags'. Dont know what it means or how to fix it, please help?

Fatal Error in Gdn_Database.Query();

Unknown column 'd.DiscussionID' in 'on clause'
select c.*, lc.DateInserted as `DateLastComment`
from GDN_Category c
join GDN_TagDiscussion td on d.DiscussionID = td.DiscussionID
left join GDN_Comment lc on c.LastCommentID = lc.CommentID
where td.TagID in ('6')
order by c.TreeLeft asc
limit 15
The error occurred on or near: /forum/library/database/class.database.php
283: $PDOStatement = $this->Connection()->query($Sql);
284: }
285:
286: if ($PDOStatement === FALSE) {
287: trigger_error(ErrorMessage($this->GetPDOErrorMessage($this->Connection()->errorInfo()), $this->ClassName, 'Query', $Sql), E_USER_ERROR);
288: }
289:
290: // Did this query modify data in any way?
291: if ($ReturnType == 'ID') {

Variables in local scope:
[Sql] 'select c.*, lc.DateInserted as `DateLastComment`
from GDN_Category c
join GDN_TagDiscussion td on d.DiscussionID = td.DiscussionID
left join GDN_Comment lc on c.LastCommentID = lc.CommentID
where td.TagID in (\'6\')
order by c.TreeLeft asc
limit 15'
[InputParameters] array (
)
[Options] array (
'ReturnType' => 'DataSet',
)
[ReturnType] 'DataSet'
[PDOStatement] false

************************************

ALSO THIS ERROR ON Click delete from 'options' in discussions veiw....

Unknown column 't.Type' in 'where clause'
select t.*
from GDN_TagDiscussion td
join GDN_Tag t on td.TagID = t.TagID
where td.DiscussionID = :tdDiscussionID
and t.Type = :tType
The error occurred on or near: /s101-2/home6/camosreptiles/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: }

Variables in local scope:
[Sql] 'select t.*
from GDN_TagDiscussion td
join GDN_Tag t on td.TagID = t.TagID
where td.DiscussionID = :tdDiscussionID
and t.Type = :tType'
[InputParameters] array (
':tdDiscussionID' => '31',
':tType' => '',
)
[Options] array (
'ReturnType' => 'DataSet',
)
[ReturnType] 'DataSet'
[PDOStatement] array (
'queryString' => 'select t.*
from GDN_TagDiscussion td
join GDN_Tag t on td.TagID = t.TagID
where td.DiscussionID = :tdDiscussionID
and t.Type = :tType',
)