$gHI ) ? "<" : "<="; // 表示開始時間 //--------------------------- // read template $tpl_index = join( "", file( "./tpl_index.html" )); //--------------------------- // data read $dbh = db_connect(); // id $sql = "SELECT `id` FROM `tbl_theme` WHERE `date`" . $equal . "'" . $gYMD . "' ORDER BY `date` DESC LIMIT 1"; $qry = mysql_query( $sql, $dbh ) or die( mysql_error()); $row_num = mysql_num_rows( $qry ); if( 0 < $row_num ){ $id = mysql_result( $qry, 0, "id" ); } //echo "$sql
$id"; // select menu $str_select = MakeBackNumber( $id, $gYMD, $equal, $dbh ); db_close( $dbh ); //--------------------------- // replace $tpl_index = str_replace( "[+++ SELECT MENU +++]", $str_select, $tpl_index ); $tpl_index = str_replace( "[+++ ID +++]", $id, $tpl_index ); //--------------------------- // echo echo "$tpl_index"; ?>