SELECT * FROM bill_deposit INNER JOIN member ON bill_deposit.mem_id = member.mem_id
<?php include"include/header1.php";?> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="100%" align="center"></td><table width="673px" height="630" border="0" align="center" cellpadding="0" cellspacing="0" id=""> <tr> <td height="630" align="center" valign="top"><h3>รายงาน</h3><form method="post"> </form> <form method="post" action="" > <table width="1006" border='2'> <tr> <td height="112" colspan="4"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" id="td"> <tr> <tr bgcolor='#ff99ff' valign='top'> <td align="center" id="td"><center><b>เลขที่ใบขายฝาก</b></center></td> <td align="center" id="td"><center><b>รห้สลูกค้า</b></center></td> <td align="center" id="td"><center><b>ประเภท</b></center></td> <td align="center" id="td"><center><b>รายการ</b></center></td> <td align="center" id="td"><center><b>ราคา</b></center></td> <td align="center" id="td"><center><b>วันที่ขายฝาก</b></center></td> <td align="center" id="td"><center><b>วันที่พ้นกำหนด</b></center></td> <td align="center" id="td"><center><b>น้ำหนัก</b></center></td> <td align="center" id="td"><center><b>สถานะ</b></center></td> </tr> <?php include "include/connect.php"; $search=$_POST['search']; // คำสั่ง SQL ที่ใช้ในการเลือกข้อมูลที่อยู่ในฐานข้อมูลกลับมา (เรียงตามลำดับ ID) $result = mysql_query("select * from bill_deposit where id_dep "); /* ในลูปด้านล่าง เทียบได้กับการดึงข้อมูลมาทีละ 1 Record เพื่อนำมาแสดงผลทางหน้าจอ */ $a=0; while($rs = mysql_fetch_array($result)) { $a++;?> <tr> <td align="center"><?php echo $rs['id_dep'] ; ?></td> <td align="center"><?php echo $rs['id_mem'] ; ?></td> <td align="center"><?php echo $rs[''] ; ?></td> <td align="center"><?php echo $rs[''] ; ?></td> <td align="center"><?php echo $rs[''] ; ?></td> <td align="center"><?php echo $rs['datetime'] ; ?></td> <td align="center"><?php echo $rs['date_end'] ; ?></td> <td align="center"><?php echo $rs['weight1'] ; ?></td> <td align="center"><?php echo $rs['status_dep'] ; ?></td> </tr> <?php } ?> </table> </form> <?php include"include/footer.php";?>
<?php include "include/connect.php"; $search=$_POST['search']; // คำสั่ง SQL ที่ใช้ในการเลือกข้อมูลที่อยู่ในฐานข้อมูลกลับมา (เรียงตามลำดับ ID) $result = mysql_query("SELECT bill_deposit.*,deposit.* FROM bill_deposit,deposit WHERE bill_deposit.id_dep = deposit.id_dep "); /* ในลูปด้านล่าง เทียบได้กับการดึงข้อมูลมาทีละ 1 Record เพื่อนำมาแสดงผลทางหน้าจอ */ $a=0; while($rs = mysql_fetch_array($result)) { $a++;?> <tr> <td align="center"><?php echo $rs['id_dep'] ; ?></td> <td align="center"><?php echo $rs['id_mem'] ; ?></td> <td align="center"><?php echo $rs['id_type'] ; ?></td> <td align="center"><?php echo $rs['weight'] ; ?></td> <td align="center"><?php echo $rs['price'] ; ?></td> <td align="center"><?php echo $rs['datetime'] ; ?></td> <td align="center"><?php echo $rs['date_end'] ; ?></td> <td align="center"><?php echo $rs['weight1'] ; ?></td> <td align="center"><?php echo $rs['status_dep'] ; ?></td> </tr> <?php } ?>
SELECT bill_deposit.*,deposit.*,member.* FROM bill_deposit,deposit,member WHERE bill_deposit.id_dep = deposit.id_dep AND bill_deposit.mem_id = member.mem_id
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง