OpenCart DB 查询问题(语法误解)


OpenCart DB query issue (syntax misunderstand)

OpenCart v1.5.3.1,导出插件:

    $query  = "SELECT pd.*, cg.name FROM `".DB_PREFIX."product_discount` pd ";
    $query .= "LEFT JOIN `".DB_PREFIX."customer_group` cg ON cg.customer_group_id=pd.customer_group_id ";
    $query .= "ORDER BY pd.product_id, cg.name";

谁能解释一下,pdcg在这里意味着什么?

在其他地方遇到类似的sintax,但不确定它意味着什么以及如何使用它......

看起来这是一些常见的事情,但我对使用数据库还很陌生,请帮助:-(

此查询生成错误:

注意:错误:"字段列表"中的未知列"cg.name"错误编号: 1054

pd is the alias name for table `product_discount`
cg is the alias name for table `customer_group`

Notice: Error: Unknown column 'cg.name' in 'field list' Error No: 1054

这实际上意味着表中没有名称字段customer_group