VBR_#1 – Menampilkan informasi Top 10 PIC ditampilkan berdasarkan nama

  • VBR_#1 : Menampilkan informasi Top 10 PIC ditampilkan berdasarkan nama

  • Permasalahan: Tidak ada informasi Top 10 PIC di halaman utama

  • Pemecahan masalah: Dengan menggunakan WinSCP saya mengubah script sql dengan dikelompokan berdasarkan perbulan dan ditampilkan bersadarkan nama.

  • Hasil: Terdapat informasi Top 10 PIC yang di tampilkan berdasarkan nama, jika ada 10 pic yang tercatat menangani tiket ROOSTER bulan ini

<div class=”col-lg-4 col-xs-12″>

<div class=”panel panel-default”>

<div class=”panel-heading”>

<h3 class=”panel-title”><i class=”fa fa-thumbs-o-up”></i> Top 10 PIC This Month</h3>

</div>

<div class=”panel-body”>

<div class=”table-responsive”>

<table class=”table table-bordered table-hover table-striped”>

<thead>

</tr>

<?php include(“cofig/koneksi.php”); ?>

<tbody>

<?php

$no = 1 ;

$sql = mysql_query(`SELECT

 

c.firstname,

b.created,

date_format(b.created,’%M’) AS bulan,

MONTH(b.`created`) as bulan_angka,

b.staff_id,

count(*)as total

FROM rooster_ticket__cdata a, rooster_ticket b , rooster_staff c

WHERE a.ticket_id = b.ticket_id and b.staff_id = c.staff_id and month(b.created) = month(NOW()) and year(b.created) = year(now())

GROUP by b.staff_id,bulan
order by total desc LIMIT 10`);

$data = mysql_num_rows($sql);

?>

<?php

while($data=mysql_fetch_array($sql))

{

?>

<tr>

<td width=”5%”><?php echo $no; ?></td>

<td width=”25%”><?php echo $data[“firstname”]; ?></td>

<td width=”5%”><?php echo $data[“total”]; ?></td>

<?php $no++; }?>

</tbody>

</table>

</div>

</div>

</div>

</div>

Views All Time
Views All Time
24
Views Today
Views Today
1
24 Total Views 1 Views Today

Leave a Reply

You must be logged in to post a comment.