Veritabanımızı oluşturalım
CREATE TABLE uretim ( id int auto_increment primary key, musteri varchar(255), adet int(11), onay int(1) ); INSERT INTO uretim (id,musteri,adet,onay) VALUES (1, '1.Müşteri',5,0), (2, '2.Müşteri',8,1), (3, '3.Müşteri',2,2), (4, '4.Müşteri',7,3);
baglan.php adlı dosyamızdan veritabanı bağlantımızı oluşturmuş varsayıp, kodlarımızı ekliyoruz.
<?php include "baglan.php"; ?> <table border="1" bordercolor="#111111" width="100%"> <tr> <td width="25%" > <table border="1" bordercolor="#111111" width="100%"> <tbody> <th>Bekleyen</th> </tbody> <thead> <tr> <td>Müşteri Adı</td><td>Adet</td> </tr> <?php $veri=mysql_query("select * table uretim Where onay = 1"); while($v=mysql_fetch_array($veri)){ echo '<tr><td>'.$v["musteri"].'</td><td>'.$v["adet"].'</td>'; } ?> </tr> </thead> </table> </td> <td width="25%" > <table border="1" bordercolor="#111111" width="100%"> <tbody> <th>Kaplama</th> </tbody> <thead> <tr> <td>Müşteri Adı</td><td>Adet</td> </tr> <?php $veri=mysql_query("select * table uretim Where onay = 2"); while($v=mysql_fetch_array($veri)){ echo '<tr><td>'.$v["musteri"].'</td><td>'.$v["adet"].'</td>'; } ?> </tr> </thead> </table> </td> <td width="25%" > <table border="1" bordercolor="#111111" width="100%"> <tbody> <th>Taşlama</th> </tbody> <thead> <tr> <td>Müşteri Adı</td><td>Adet</td> </tr> <?php $veri=mysql_query("select * table uretim Where onay = 3"); while($v=mysql_fetch_array($veri)){ echo '<tr><td>'.$v["musteri"].'</td><td>'.$v["adet"].'</td>'; } ?> </tr> </thead> </table> </td> <td width="25%" > <table border="1" bordercolor="#111111" width="100%"> <tbody> <th>Sevkiyat</th> </tbody> <thead> <tr> <td>Müşteri Adı</td><td>Adet</td> </tr> <?php $veri=mysql_query("select * table uretim Where onay = 1"); while($v=mysql_fetch_array($veri)){ echo '<tr><td>'.$v["musteri"].'</td><td>'.$v["adet"].'</td>'; } ?> </tr> </thead> </table> </td> </tr> </table>