include ("../header_en.inc"); ?>
MYSQL_connect("localhost","narudiary","keitarooo"); @mysql_select_db("narudiary"); $myquery = "SELECT * FROM news WHERE language = '1' ORDER BY date DESC LIMIT 0,5"; $queryresult = MYSQL_QUERY($myquery); $numrows = MYSQL_NUM_ROWS($queryresult); $i4=0; while ($i4 < $numrows){ $date = mysql_result($queryresult,$i4,"date"); $author = mysql_result($queryresult,$i4,"author"); $desc = mysql_result($queryresult,$i4,"newstext"); $annee = substr($date,0,4); $mois = substr($date,5,2); $numjour = substr($date,8,1); if ($numjour = "0") {$jour = substr($date,9,1);} else {$jour = substr($date,8,2);} $suffixjour = substr($date,9,1); $heure = substr($date,11,2); $minutes = substr($date,14,2); if ($suffixjour == "1") {$suffixjour = "st";} else {if ($suffixjour == "2") {$suffixjour = "nd";} else {if ($suffixjour == "3") {$suffixjour = "rd";} else {$suffixjour = "th";} } } if ($mois == "01") {$mois = "January";} if ($mois == "02") {$mois = "February";} if ($mois == "03") {$mois = "March";} if ($mois == "04") {$mois = "April";} if ($mois == "05") {$mois = "May";} if ($mois == "06") {$mois = "June";} if ($mois == "07") {$mois = "July";} if ($mois == "08") {$mois = "August";} if ($mois == "09") {$mois = "September";} if ($mois == "10") {$mois = "October";} if ($mois == "11") {$mois = "November";} if ($mois == "12") {$mois = "December";} ?>
Dear diary, Naru Narusegawa $i4++; } ?> |