require_once"./dbconfig.php";
require_once"./config.php";
require_once"../../db/util/nslib.php";
require "DB.php";
if ($_REQUEST['dr_name_lk']) {
$cond_sql .= " and (pr_name_e ilike ? or pr_name_p ilike ?)";
$dr_name_val = "%{$_REQUEST['dr_name_lk']}%";
$cond_val[] = $dr_name_val;
$cond_val[] = $dr_name_val;
}
$db =& DB::connect($dsn);
if (DB::isError($db)) {
$db->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['shozoku_e']}
"; if ($dval['pr_name_e'] !="") { $doctors_with_link[] = "{$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("2008/program/doctors_list.tpl"); exit; ?>