[英]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";
有人可以解釋一下, pd
和cg
在這里意味着什么?
在其他地方遇到類似的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
沒有名稱字段
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.