MySQL error

<%- if @topic_view.topic.tags.present? %>
<%= t 'js.tagging.tags' %>: <%- @topic_view.topic.tags.each do |t| %> <%= t %> <%- end %>
<% end %>

Silverstripe Version: Silverstripe3

Question: MYSQL error. How to fix it?

Details of your query go here

# [User Error] Uncaught SS_DatabaseException: Couldn't run query: SELECT DISTINCT count(DISTINCT "DataObjectAsPage"."ID") AS "Count" FROM "DataObjectAsPage" LEFT JOIN "Prize" ON "Prize"."ID" = "DataObjectAsPage"."ID" INNER JOIN "Prize_Levels" ON "Prize_Levels"."PrizeID" = "DataObjectAsPage"."ID" LEFT JOIN "MemberLevel" ON "Prize_Levels"."MemberLevelID" = "MemberLevel"."ID" INNER JOIN "Prize_PrizeCategories" ON "Prize_PrizeCategories"."PrizeID" = "DataObjectAsPage"."ID" LEFT JOIN "PrizeCategory" ON "Prize_PrizeCategories"."PrizeCategoryID" = "PrizeCategory"."ID" WHERE ("ParentID" = ?) AND ("Prize"."PrizeStatus" IN (?, ?)) AND ("MemberLevel"."Level" = ?) AND ("PrizeCategories"."PrizeCategoryID" = ?) AND ("DataObjectAsPage"."ClassName" IN (?)) Unknown column 'PrizeCategories.PrizeCategoryID' in 'where clause'

Hi,

I’m afraid it’s pretty impossible to know how to fix it without knowing what code was being used to generate the query. Can you post some more detail in your question.