- $query = "SELECT addon.*, arctype.* FROM $addontable addon
- LEFT JOIN arctype ON arctype.id = addon.typeid
- $where $orderby";
- } else {
- $query = "SELECT main.id AS aid,main.*,main.description AS description1, type.*
- FROM $maintable main
- LEFT JOIN type ON type.id = main.typeid
- LEFT JOIN $addontable addon ON addon.aid = main.id
- $where $orderby";
如果是5.7以前的版本
- $query = "SELECT addon.*, arctype.* FROM $addontable addon
复制这段加上即可!
2 然后 再改这段
- else {
- $query = "SELECT main.id AS aid,main.*,main.description AS description1, type.*
- FROM $maintable main
- LEFT JOIN type ON type.id = main.typeid
- LEFT JOIN $addontable addon ON addon.aid = main.id
- $where $orderby";
5.7所有的版本 都要改这段 改成:
- else {
- $query = "select addon.*,main.id as aid,main.*,main.description as description1, type.*
- from $maintable main
- left join dede_arctype type on type.id=main.typeid
- left join $addontable addon on addon.aid=main.id
- $where $orderby";
- $query = "SELECT main.id AS aid,main.*,main.description AS description1, type.*
这段改成
- $query = "select addon.*,main.id as aid,main.*,main.description as description1, type.*
- $query = "select addon.*, arctype.* from $addontable addon
- left join dede_arctype arctype on arctype.id=addon.typeid
- $where $orderby";
- } else {
- $query = "select addon.*,main.id as aid,main.*,main.description as description1, type.*
- from $maintable main
- left join dede_arctype type on type.id=main.typeid
- left join $addontable addon on addon.aid=main.id
- $where $orderby";
本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!