mas saya pyk tb kayak gini:
tb_members :
|tgl |mem_id |ambil|jual|
|29/05/2012|R236929693|10 |2 |
|29/05/2012|R417409972|43 |5 |
|29/05/2012|R492849777|30 |1 |
|29/05/2012|R522445347|17 |2 |
|29/05/2012|R665985398|12 |4 |
|29/05/2012|R764750298|29 |8 |
|29/05/2012|R956336961|54 |2 |
|30/05/2012|R236929693|5 |1 |
|30/05/2012|R417409972|4 |2 |
|30/05/2012|R492849777|2 |1 |
|30/05/2012|R522445347|3 |1 |
|30/05/2012|R665985398|7 |1 |
|30/05/2012|R764750298|6 |1 |
|30/05/2012|R956336961|3 |1 |
|31/05/2012|R236929693|20 |4 |
|31/05/2012|R417409972|35 |1 |
|31/05/2012|R492849777|15 |1 |
|31/05/2012|R522445347|20 |1 |
|31/05/2012|R665985398|5 |1 |
|31/05/2012|R764750298|10 |1 |
|31/05/2012|R956336961|20 |1 |
saya pengen bentuk laporannya kayak gini ..
==============================
|No.|Members ID|Ambil|Terjual|
==============================
|1 |R236929693|10 |2 |
|2 |R417409972|43 |5 |
|3 |R492849777|30 |1 |
|4 |R522445347|17 |2 |
|5 |R665985398|12 |4 |
|6 |R764750298|29 |8 |
|7 |R956336961|54 |2 |
| Tanggal : 29/05/2012 |
|6 |R236929693|5 |1 |
|7 |R417409972|4 |2 |
|8 |R492849777|2 |1 |
|9 |R522445347|3 |1 |
|10 |R665985398|7 |1 |
|11 |R764750298|6 |1 |
|12 |R956336961|3 |1 |
| Tanggal : 30/05/2012 |
dan seterusnya ...
coding yg telah sy buat kayak gini ...
require_once( '../opendb.php' );
$pilih = 'select * from tb_mem';
$loop = mysql_query( $pilih );
$no=1;
while($data=mysql_fetch_array($loop)) {
echo '<table>';
echo '<tr>';
echo '<td>'.'No. : '.$no.'</td>';
echo '<td>'.'Members ID : '.$data['mem_id'].'</td>';
echo '<td>'.'Jumlah Ambil : '.$data['ambil'].'</td>';
echo '<td>'.'Jumlah Terjual : '.$data['jual'].'</td>';
echo '</tr>';
echo '</table>';
$no++;
}
mysql_free_result( $loop);
?>
Mohon bantuannya mas ...