for($j=1;$j <= 3;$j++){
$status=get_selname('status_select',$j);
?>
$sql="SELECT we_shop.*, ci_name, ci_kenno FROM $table ";
$sql.="LEFT JOIN $ctable ON sh_ci_no=ci_no ";
$sql.="WHERE sh_del != 1 ";
$sql.="AND sh_status like '%&$j&%' ";
$sql.="ORDER BY sh_order, sh_no";
// print $sql;
$result = dbproc($conn_id,$sql);
$recs = mysql_num_rows( $result ); // 行数を取得
for($i=1;$i <= $recs;$i++){
$pi=$i-1; // レコードオフセット(0オリジン)
$sh_no =itemget($result,$pi,"sh_no");
$sh_ci_no =itemget($result,$pi,"sh_ci_no");
$sh_title =itemget($result,$pi,"sh_title");
$sh_status =itemget($result,$pi,"sh_status");
$sh_tel =itemget($result,$pi,"sh_tel");
$sh_fax =itemget($result,$pi,"sh_fax");
$sh_zip =itemget($result,$pi,"sh_zip");
$sh_addr =itemget($result,$pi,"sh_addr");
$sh_addr2 =itemget($result,$pi,"sh_addr2");
$sh_comment =itemget($result,$pi,"sh_comment");
$ci_name =itemget($result,$pi,"ci_name");
$ci_kenno =itemget($result,$pi,"ci_kenno");
$ImgFileDir = "images/" . $sh_no;
$ken_name = '';
if($ci_kenno>0){
$ken_name=get_selname('ken_select',$ci_kenno); // get ken name
}
$addr = $ken_name.$ci_name.$sh_addr;
?>
$file_flag = file_chk($ImgFileDir . '/1');
if($file_flag){
?>

}else{
?>

}
?>
if($sh_zip){
?>
邮政编码:
}
?>
详细地址:
电话号码:
if($sh_fax){ ?>
传真号码:
} ?>
if($sh_comment){ ?>
} ?>
}
}
dbdisconnect($conn_id); // データベース切断
?>