|
 |
|
มี status อยู่ 3 สถานะ paymint,interest,payout แต่ต้องการแสดงแค่ 2 สถานะ paymint , interest ต้องทำยังใงครับ |
|
 |
|
|
 |
 |
|
ผมค้นหาแล้วไม่ได้ผมก็เลยตั่งกระทู่ใหม่ครับ ต้องรบกวนด้วยนะครับ
|
 |
 |
 |
 |
Date :
2013-05-19 16:55:24 |
By :
liwkalg |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
if เอาครับว่าถ้าเป็น payout ไม่ต้องแสดง ครับ
|
 |
 |
 |
 |
Date :
2013-05-19 16:59:45 |
By :
itpcc |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ตอบความคิดเห็นที่ : 2 เขียนโดย : itpcc เมื่อวันที่ 2013-05-19 16:59:45
รายละเอียดของการตอบ ::
ต้องเริมจากตรงใหนครับ ต่อให้ด้วยครับ งงง
Code (PHP)
<?php
$id_dep=$_POST[id_dep];
if ($id_dep==""){
include "include/connect.php";
// คำสั่ง SQL ที่ใช้ในการเลือกข้อมูลที่อยู่ในฐานข้อมูลกลับมา (เรียงตามลำดับ ID)
$result = mysql_query("SELECT bill_deposit.*,deposit.*,type.*,member.* FROM bill_deposit,deposit,type,member
WHERE status_dep = 'payinterest' AND bill_deposit.id_dep = deposit.id_dep AND deposit.id_type = type.id_type AND bill_deposit.id_mem = member.id_mem");
/* ในลูปด้านล่าง เทียบได้กับการดึงข้อมูลมาทีละ 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['name'] ; ?> <?php echo $rs['surname'] ; ?></td>
<td align="center"><?php echo $rs['name_type'] ; ?> <?php echo $rs['detail_name'] ; ?></td>
<td align="center"><?php echo $rs['weight1'] ; ?></td>
<td align="center"><?php echo $rs['price'] ; ?></td>
<td align="center"><?php echo $rs['quility'] ; ?></td>
<td align="center"><a href="admin_interest.php?id=<?=$rs['id_dep'];?>"><img src="pay.jpg" width="25" height="25" border="0" title="ชำระดอกเบี้ย"></a></td>
<!--<td align="center"><a href="pledge_del.php?id=<?=$rs['id_dep'];?>" onclick="return confirm('ยืนยันการลบข้อมูลขายฝาก <?php echo $rs['id_dep'] ; ?> ออกจากระบบ')"><img src="icon_del.gif" width="25" height="25" border="0" title="ลบ"></td>-->
</tr>
<?php
}
mysql_close();
}else{
include "include/connect.php";
$id_dep=$_POST[id_dep];
$search=$_POST['search'];
// คำสั่ง SQL ที่ใช้ในการเลือกข้อมูลที่อยู่ในฐานข้อมูลกลับมา (เรียงตามลำดับ ID)
$result1 = mysql_query("SELECT bill_deposit.*,deposit.*,type.*,member.* FROM bill_deposit,deposit,type,member
WHERE bill_deposit.id_dep = deposit.id_dep AND deposit.id_type = type.id_type AND bill_deposit.id_mem = member.id_mem AND bill_deposit.id_dep = '$id_dep' " );
/* ในลูปด้านล่าง เทียบได้กับการดึงข้อมูลมาทีละ 1 Record เพื่อนำมาแสดงผลทางหน้าจอ */
$a=0;
while($rs = mysql_fetch_array($result1)) {
$a++;
?>
<tr>
<td align="center"><?php echo $rs['id_dep'] ; ?></td>
<td align="center"><?php echo $rs['name'] ; ?> <?php echo $rs['surname'] ; ?></td>
<td align="center"><?php echo $rs['name_type'] ; ?> <?php echo $rs['detail_name'] ; ?></td>
<td align="center"><?php echo $rs['weight1'] ; ?></td>
<td align="center"><?php echo $rs['price'] ; ?></td>
<td align="center"><?php echo $rs['quility'] ; ?></td>
<td align="center"><a href="admin_interest.php?id=<?=$rs['id_dep'];?>"><img src="pay.jpg" width="25" height="25" border="0" title="ชำระดอกเบี้ย"></a></td>
<!--<td align="center"><a href="pledge_del.php?id=<?=$rs['id_dep'];?>" onclick="return confirm('ยืนยันการลบข้อมูลขายฝาก <?php echo $rs['id_dep'] ; ?> ออกจากระบบ')"><img src="icon_del.gif" width="25" height="25" border="0" title="ลบ"></td>-->
</tr>
<?php
}
mysql_close();
}
?>
|
 |
 |
 |
 |
Date :
2013-05-19 17:06:05 |
By :
liwkalg |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (PHP)
<?php
include "include/connect.php";
if (empty($_POST['id_dep'])) {
// คำสั่ง SQL ที่ใช้ในการเลือกข้อมูลที่อยู่ในฐานข้อมูลกลับมา (เรียงตามลำดับ ID)
$result = mysql_query("SELECT bill_deposit.*,deposit.*,type.*,member.* FROM bill_deposit,deposit,type,member
WHERE status_dep = 'payinterest' AND bill_deposit.id_dep = deposit.id_dep AND deposit.id_type = type.id_type AND bill_deposit.id_mem = member.id_mem");
}
else{
$result = mysql_query(sprintf("SELECT bill_deposit.*,deposit.*,type.*,member.* FROM bill_deposit,deposit,type,member
WHERE bill_deposit.id_dep = deposit.id_dep AND deposit.id_type = type.id_type AND bill_deposit.id_mem = member.id_mem AND bill_deposit.id_dep = '%s' ",$_POST['id_dep']));
}
/* ในลูปด้านล่าง เทียบได้กับการดึงข้อมูลมาทีละ 1 Record เพื่อนำมาแสดงผลทางหน้าจอ */
$a=0;
while($rs = mysql_fetch_array($result)) :
if($rs['name_type']!='payout ') :
$a++;
?>
<tr>
<td align="center"><?php echo $rs['id_dep'] ; ?></td>
<td align="center"><?php echo $rs['name'] ; ?> <?php echo $rs['surname'] ; ?></td>
<td align="center"><?php echo $rs['name_type'] ; ?> <?php echo $rs['detail_name'] ; ?></td>
<td align="center"><?php echo $rs['weight1'] ; ?></td>
<td align="center"><?php echo $rs['price'] ; ?></td>
<td align="center"><?php echo $rs['quility'] ; ?></td>
<td align="center">
<a href="admin_interest.php?id=<?php echo $rs['id_dep'];?>">
<img src="pay.jpg" width="25" height="25" border="0" title="ชำระดอกเบี้ย">
</a></td>
</tr>
<?php
endif;
endwhile;
mysql_close();
?>
|
ประวัติการแก้ไข 2013-05-19 17:20:00 2013-05-19 17:20:12
 |
 |
 |
 |
Date :
2013-05-19 17:09:49 |
By :
itpcc |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 03
|