|
![](/images/resource/spacer.gif) |
|
รบกวนพี่ๆช่วยอธิบายโค้ดPHPนี้ให้หน่อยครับผม เป็นโค้ดที่ตรวจสอบการค้างคืน กำลังงงครับ |
|
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
พิมพ์บน browser PHP คำสั่งที่อยากรู้
แบบนี้ดีกว่าครับ
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2015-11-17 01:36:04 |
By :
NewbiePHP |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
ค้นหาข้อมูลจากตารางที่เกี่ยวข้องกัน 3 ตาราง (returns, products, orders)
ตามเงื่อนไขที่กำหนด 5 เงื่อนไข (ฟิลด์ n_duedate, rn_senddate, pd_no, pd_name, or_rentname )
โดยเรียงข้อมูลจากน้อย ไปหามาก ของฟิลด์ rn_duedate
หลังจากนั้นก็หานับจำนวนแถวทั้งหมด
$rows = mysql_num_rows($returnsQRY );
เพื่อนำไปแบ่งหน้าให้เท่าๆกันโดยการหาร
$start=$pagesize*($page-1);
$Numpage = (int)($rows/$pagesize);
เมื่อได้จำนวนต่อหน้าแล้ว ก็คิวรี่อีกครั้ง เพื่อแสดงข้อมูลที่ต้องการในหน้านั้นๆ ($returnsSQL ." limit $start,$pagesize")
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2015-11-17 09:28:41 |
By :
{Cyberman} |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
|
|
|
![](/images/digitalocean-banner.jpg)
|
Load balance : Server 04
|