woshi53542316 发表于 2015-4-25 13:15:43

复制多个供应 公司首页调用问题

本帖最后由 woshi53542316 于 2015-4-25 13:18 编辑

复制多个供应公司首页调用问题            公司商铺 :复制4个供应怎么同时输出      get_one("SELECT * FROM {$table} WHERE itemid=$itemid");
      if(!$item || $item['status'] get_one("SELECT content FROM {$content_table} WHERE itemid=$itemid");
      $content = $t['content'];
      $CP = $MOD['cat_property'] && $CAT['property'];
      if($CP) {
                require DT_ROOT.'/include/property.func.php';
                $options = property_option($catid);
                $values = property_value($moduleid, $itemid);
      }
      $adddate = timetodate($addtime, 5);
      $editdate = timetodate($edittime, 5);
      $todate = $totime ? timetodate($totime, 3) : 0;
      $expired = $totime && $totime100) $pagesize = 16;
      if($view) $pagesize = ceil($pagesize/2);
      $offset = ($page-1)*$pagesize;
      $r = $db->get_one("SELECT COUNT(*) AS num FROM {$table} WHERE $condition", 'CACHE');
      $items = $r['num'];
      $pages = home_pages($items, $pagesize, $demo_url, $page);
      $lists = array();
      if($items) {
                $result = $db->query("SELECT ".$MOD['fields']." FROM {$table} WHERE $condition ORDER BY edittime DESC LIMIT $offset,$pagesize");
                while($r = $db->fetch_array($result)) {
                        $r['alt'] = $r['title'];
                        $r['title'] = set_style($r['title'], $r['style']);
                        $r['linkurl'] = $homeurl ? $MOD['linkurl'].$r['linkurl'] : userurl($username, "file=$file&itemid=$r", $domain);
                        if($kw) {
                              $r['title'] = str_replace($kw, ''.$kw.'', $r['title']);
                              $r['introduce'] = str_replace($kw, ''.$kw.'', $r['introduce']);
                        }
                        $lists[] = $r;
                }
                $db->free_result($result);
      }
}
include template('sell', $template);
?>

龙在天涯 发表于 2015-4-27 10:16:24


使用多表联查

gaofeigz 发表于 2015-4-27 16:56:20


http://bbs.destoon.com/static/image/smiley/default/mad.gif
四表联查效率挺低了,耗资源,既然都是供应为啥要复制四个呢,既然是复制肯定功能是有区别的,在公司主页菜单,再加三个频道吧。
页: [1]
查看完整版本: 复制多个供应 公司首页调用问题