Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <link rel="stylesheet" type="text/css" href="css/style.css">
- <?php
- include'koneksi.php';
- $sql=mysql_query(" SELECT a.*, SUM(IF(ISNULL(b.id_berita),0,1)) AS jml
- FROM isi_berita a
- LEFT JOIN komentar b ON b.id_berita=a.id_berita
- GROUP BY b.id_berita
- ORDER BY a.tanggal DESC LIMIT 3");
- while($tampil=mysql_fetch_array($sql)){
- ?>
- <div class="box">
- <font valign="top">
- <a href="detail_headline.php?menu=detail_headline&id=<?=$tampil['id_berita']; ?>">
- <font style='font-size: 16px; font-weight: bold;'>
- <?php echo $tampil['judul']; ?>
- </font>
- </a>
- <br>
- <font size='2px' color='gray' style='line-height: 28px; font-size: 11px;'>
- <img src='gambar/user.png' style='width: 9px; height: 9px; margin:0; border: none; line-height: 28px;' />
- Berita Upload
- <img src='gambar/time.png' style='width: 9px; height: 9px; margin:0; border: none; line-height: 28px;' />
- tanggal
- <?=$tampil['tanggal'];?> dengan <?=$tampil['jml'];?> komentar
- </font>
- <br>
- <img src="<?=$tampil['gambar'];?>" align="left" />
- <?php echo substr($tampil['isi'],0,200); ?>
- <br></br>
- <a href="detail_headline.php?menu=detail_headline&id=<?=$tampil['id_berita']; ?>" class='bacaselengkapnya'>Baca selengkapnya >></a>
- </font>
- </div>
- <br>
- <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement