mysql_connect("localhost", "root", "123");
mysql_select_db("berita");
$sql = "SELECT judul, tanggal, singkat, username, gambar FROM berita
mysql_connect("localhost", "root", "123");
mysql_select_db("berita");
$sql = "SELECT judul, tanggal, singkat, username, gambar FROM artikel ORDER BY tanggal DESC LIMIT 0, 3 ";
$data = mysql_query($sql);
?>
<?PHP
while ($baris = mysql_fetch_array($data))
{
list($tanggal, $waktu) = explode(" ", $baris[1]);
list($thn, $bln, $tgl) = explode("-", $tanggal);
?>
ORDER BY tanggal DESC LIMIT 0, 3 ";
$data = mysql_query($sql);
?>
<?PHP
while ($baris = mysql_fetch_array($data))
{
list($tanggal, $waktu) = explode(" ", $baris[1]);
list($thn, $bln, $tgl) = explode("-", $tanggal);
?>