fix getArchive method error
This commit is contained in:
parent
1954ce79ac
commit
43ec7f74ac
|
@ -223,8 +223,8 @@ class Archive
|
||||||
|
|
||||||
function getArchive($code='')
|
function getArchive($code='')
|
||||||
{
|
{
|
||||||
$sql="select * from ".$this->tbl_archives;
|
$sql="select a.* from ".$this->tbl_archives." a left join ".$this->tbl_catalog." ac on a.id=ac.aid left join ".$this->tbl_categorys." c on ac.cid=c.id ";
|
||||||
if (!empty($code)) $sql.=" where code='".$code."'";
|
if (!empty($code)) $sql.=" where c.code='".$code."'";
|
||||||
$rs=$this->db->query($sql);
|
$rs=$this->db->query($sql);
|
||||||
$rows=$rs->fetchAll();
|
$rows=$rs->fetchAll();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue