#1054 - “字段列表”中的未知列'content_type_video.field_video_file_fid'

时间:2015-10-04 14:04:29

标签: mysql drupal-6

以下查询返回上述错误。我认为这是一个别名错误,因为列在那里,但我无法从这个错误/主题的其他帖子中找出来。查询工作正常,直到我添加第11和第21行。任何帮助表示赞赏。提前谢谢。

SELECT 
    node.uid AS uid,
    node.nid AS nid,
    node.vid AS vid, 
    node.title AS post_title,
    node_revisions.body AS post_content,
    FROM_UNIXTIME(node.created) AS post_date,
    users.name AS post_author,
    content_field_date.field_date_value AS publish_date,
    content_type_article.field_article_publication_value AS publication_name,
    content_type_video.field_video_file_fid AS fid,
    term_node.tid AS tid
FROM node node
LEFT JOIN node_revisions ON node.vid = node_revisions.vid
LEFT JOIN users ON node.uid = users.uid
LEFT JOIN content_field_date ON content_field_date.nid = node.nid
LEFT JOIN content_type_article ON content_type_article.nid = node.nid
LEFT JOIN term_node ON term_node.nid = node.nid
LEFT JOIN files ON files.fid = content_type_video.field_video_file_fid 
WHERE 1
ORDER BY post_date DESC

1 个答案:

答案 0 :(得分:2)

您没有加入一个名为content_type_video的表,您在连接条件

中引用该表