织梦用sql主表关联栏目查询 生成静态url语句的办法

下面的sql即可实现:

$dsql->SetQuery("SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule, tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath FROM `dede_archives` arc LEFT JOIN `dede_arctype` tp on arc.typeid=tp.id WHERE FROM_UNIXTIME(arc.senddate,'%Y-%m-%d') = "."'".date('Y-m-d')."'"); $dsql->Execute(); while ($rows = $dsql->GetArray()) { $rows['url'] = GetFileUrl($rows['id'],$rows['typeid'],$rows['senddate'],$rows['title'],$rows['ismake'], $rows['arcrank'],$rows['namerule'],$rows['typedir'],$rows['money'],$rows['filename'],$rows['moresite'],$rows['siteurl'], $rows['sitepath']); $arcArray[] = $rows; }  

 

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/0738746ed591d61d8f571db9be94f80a.html