<?php
//=============DB Á¢¼Ó ========================
$db_host = "localhost"; // Database È£½ºÆ®¸í
$db_connect_id = "À¯Àú";// DB °èÁ¤ id
$db_connect_pwd = "¾ÏÈ£";// DB °èÁ¤ ¾ÏÈ£
$db_name = "DB À̸§"; // DB Name
$connect=mysql_connect( "$db_host", "$db_connect_id",
"$db_connect_pwd")
or die( " SQL server¿¡ ¿¬°áÇÒ ¼ö ¾ø½À´Ï´Ù.");
mysql_select_db("$db_name",$connect);
?>
<?
$code=notice // °Ô½ÃÆÇ ÄÚµåÀ» ³Ö½À´Ï´Ù.
$que1="select id,title,DATE_FORMAT(reg_date,'m/d') from
$code order by reg_date desc" ;
$result=mysql_query($que1,$connect );
$total = mysql_affected_rows();
echo("
<table border=0 width=95% cellpadding=3 cellspacing=3><tr><td>
<table border=0 width=100% cellpadding=1 cellspacing=1>");
for($i=0 ; $i< 5 ; $i++) // start ¿¡¼ scale ±îÁö ¸¸
{
if($i< $total ) // Àüü ÀÚ·á °³¼ö±îÁö¸¸ Ãâ·Â
{
mysql_data_seek($result,$i);
$row=mysql_fetch_array($result);
$row[title] = stripslashes($row[title]);
//===== ÀÛ¼ºÀÏ
echo("<tr><td>[$row[2]]");
//====== ±Û Á¦¸ñ Ç¥½Ã ºÎºÐ
$title_sta = htmlspecialchars($row[title]);
$title_sta = ereg_replace( "'", "£§", $title_sta
);
echo(" <A href=\"./Tboard/Tboard.html?id=$row[id]&code=$code&start=$start&mode=read\">
$row[title]</a></td></tr>");
}
}
echo("<tr><td align=right><a href=./Tboard/Tboard.html?code=$code>-
more -</a></td></tr></table>
</td></tr></table>
");
?>
|