getMessage(); $db->getDebugInfo(); die("connect error"); } //データを取得 //$sql = "SELECT * from doctors order by family_name_e"; $sql = "SELECT pr_name_e,pr_name_p,shozoku_e,sname from program where interid is not null"; $sql .= $cond_sql; $sql .= " group by pr_name_e,pr_name_p,shozoku_e,sname order by sname"; //$stt = $db->prepare($sql); $result = $db->getAll($sql,$cond_val,DB_FETCHMODE_ASSOC); if (DB::isError($result)) { echo $result->getMessage() . "
"; echo $result->getDebugInfo(); die("
ERROR
"); } $doctors_data = $result; foreach($doctors_data as $dkey=>$dval) { //$doctors_with_link[] = "

{$dval['dr_name_e']}

{$dval['shozoku_e']}

"; if ($dval['pr_name_e'] !="") { $doctors_with_link[] = "

{$dval['pr_name_e']}

{$dval['shozoku_e']}

"; } } //$o_smarty->assign("doctors_data",$doctors_data); $o_smarty->assign("doctors_with_link",$doctors_with_link); $o_smarty->assign('table',array('')); $o_smarty->assign('tr',array('class="back2"')); $o_smarty->assign('td',array('')); $o_smarty->display("2010/program/doctors_list.tpl.html"); exit; ?>