我已经从以前的Joomla站点转移了一个JReviews数据库,但是在使数据库与插件对话时确实遇到了一些麻烦。
此处列出的三个错误页面之一。我对MySQL越来越擅长,但这真是一团糟,如果有人可以看到一个简单的修复程序,那真是太麻烦了!
'字段列表'中未知列'Totals.media_count'SQL = SELECT Listing.id AS Listing.listing_id
,Listing.alias AS Listing.slug
,Listing.title AS Listing.title
,Listing.introtext AS Listing.summary
,Listing.fulltext AS Listing.description
,Listing.images AS Listing.images
,Listing.hits AS Listing.hits
,Listing.catid AS Listing.cat_id
,Listing.created_by AS Listing.user_id
,Listing.created_by_alias AS Listing.author_alias
,Listing.created AS < cc>,Listing.modified AS Listing.created
,Listing.access AS Listing.modified
,Listing.state AS Listing.access
,Listing.publish_up AS Listing.state
,Listing.publish_down AS Listing.publish_up
,Listing.metakey AS Listing.publish_down
,Listing.metadesc AS Listing.metakey
,'com_content'AS Listing.metadesc
,Field.featured AS Listing.extension
,JreviewsCategory.criteriaid AS Listing.featured
,Category.id AS Listing.listing_type_id
,Category.title AS Category.cat_id
,类别.alias AS Category.title
,Category.params AS Category.slug
,Directory.id AS Category.params
,Directory.desc AS Directory.dir_id
,Directory.title AS Directory.title
,User.id AS Directory.slug
,User.name AS User.user_id
,User.username AS User.name
,User.email AS User.username
,Claim.approved AS User.email
,Totals.user_rating AS Claim.approved
,Totals.user_rating_count AS Review.user_rating
,Totals.user_criteria_rating AS < cc>,Totals.user_criteria_rating_c ount AS Review.user_rating_count
,Totals.user_comment_count AS Review.user_criteria_rating
,Totals.editor_rating AS Review.user_criteria_rating_count
,Totals.editor_rating_count AS Review.review_count
,Totals.editor_criteria_rating AS Review.editor_rating
,Totals.editor_criteria_rating_count AS Review.editor_rating_count
,Totals.editor_comment_count AS Review.editor_criteria_rating
,Totals.media_count AS Review.editor_criteria_rating_count
,Totals.video_count AS Review.editor_review_count
,Totals.photo_count AS Listing.media_count
,Totals.audio_count AS Listing.video_count
,Totals.attachment_count AS Listing.photo_count
,(Totals.media_count-总计.media_count_user)AS Listing.audio_count
,(Totals.video_count-Totals.video_count_user)AS Listing.attachment_count
,(Totals.photo_count-Totals.photo_count_user)AS Listing.media_count_owner
,(Totals.audio_count-Totals.audio_count_user)AS Listing.video_count_owner
, (Totals.attachment_count-Totals.attachment_count_user)AS Listing.photo_count_owner
,Totals.media_count_user AS Listing.audio_count_owner
,Totals.video_count_user AS Listing.attachment_count_owner
,Totals.photo_count_user AS Listing.media_count_user
,Totals.audio_count_user AS Listing.video_count_user
,Totals.attachment_count_user AS Listing.photo_count_user
FROM #__content作为列表USE KEY(jr_created)向左联接#__jreviews_listing_totals AS总计ON Totals.listing_id = Listing.id AND Totals.extension ='com_con帐篷'LEFT JOIN #__jreviews_content AS字段打开Field.contentid = Listing.id LEFT JOIN #__jreviews_categories AS JreviewsCategory打开JreviewsCategory.id = Listing.catid和JreviewsCategory。Listing.audio_count_user
='com_content'LEFT JOIN #__categories AS类别打开。 = Listing.catid AND Category.extension ='com_content'LEFT JOIN #__jreviews_directories AS Directory ON Directory.id = JreviewsCategory.dirid LEFT JOIN #__users AS User ON User.id = Listing.created_by LEFT JOIN #__jreviews_claims AS Claim ON Claim.listing_id = Listing.id AND Claim.user_id = Listing.created_by AND Claim.approved = 1 WHERE 1 = 1 AND(Listing.catid IN(9)AND Listing.state> = 0 AND Listing.access IN(1,2,3) )ORDER BY Listing.created DESC LIMIT 10
最佳答案
正如@Gray上文所述,欢迎来到SO。表格“ #__jreviews_listing_totals”似乎有问题。如果在此页面上执行Control + F并搜索“ AS Totals”,您将看到在别名“ Totals”中代表该表的位置。没有看到该表的结构,我无法确切地说出为什么会出错,但是似乎其中没有“ media_count”字段。
关于mysql - Joomla未知专栏JReviews,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42302218/