assign("SITE_NAME",SITE_NAME); $sql = " SELECT SQL_CALC_FOUND_ROWS m1.model_cate, m1.model_id, m1.stat, m1.name_en, m1.name_ja, m1.album0, m1.teikei_url, m1.blog_url, m1.height, m1.bust, m1.waist, m1.hip, m1.shoes FROM m_model m1 WHERE m1.del_flg = 0 AND m1.stat = 1 ORDER BY m1.sort desc "; $sth = $dbMaster->prepare($sql); $result = $dbMaster->execute($sth,array()); $header = 0; while($row = $result->fetchRow(DB_FETCHMODE_ASSOC)) { if($header != $row['model_cate']) { $tmpl->loopset("list{$row['model_cate']}") ; } $tmpl->assign("model_id",$row['model_id']); $tmpl->assign("name_en",$row['name_en']); $tmpl->assign("name_ja",$row['name_ja']); $tmpl->assign("album0",img_check($row['album0'])); $tmpl->assign("model_id",$row['model_id']); $tmpl->loopnext(); } $tmpl->loopset("") ; $tmpl->flush(); ?>