อยากให้ข้อมูล ลงตามหัวข้อตารางที่กำหนดครับ ทำยังไงครับ

ถาม-ตอบ แนะนำไอเดียว โค้ดตัวอย่าง แนวทาง วิธีแก้ปัญหา อยากให้ข้อมูล ลงตามหัวข้อตารางที่กำหนดครับ ทำยังไงครับ

อยากให้ข้อมูล ลงตามหัวข้อตารางที่กำหนดครับ ทำยังไงครับ

 อยากให้ข้อมูล ลงตามช่องที่กำหนด ตามหัวข้ออ่ะครับ ตอนนี้ข้อมูลมันลงไม่ตรง




                  <table class="table table-bordered" id="OCCDTEquip">
                    <thead>
                    <tr class="system">
                      <th class="text-center"> WEEK </th>
                       <th class="text-center">SPDC</th>
                       <th class="text-center">C1</th>
                       <th class="text-center">C2</th>
                       <th class="text-center">C3</th>
                       <th class="text-center">C4</th>
                       <th class="text-center">C5.1</th>
                       <th class="text-center">C5.2</th>
                       <th class="text-center">C6</th>
                       <th class="text-center">C7A</th>
                       <th class="text-center">C7B</th>
                       <th class="text-center">C8A</th>
                       <th class="text-center">C8B</th>
                       <th class="text-center">C9A</th>
                       <th class="text-center">C9B</th>
                       <th class="text-center">C10A</th>
                       <th class="text-center">CR-A</th>
                       <th class="text-center">CR-B</th>
                       <th class="text-center">CR-C</th>
                       <th class="text-center">CR-D</th>
                       <th class="text-center">CR-J</th>
                    </tr>
                    </thead>
                  <tbody>
                      <tr>
                     
                     <td>LAST 3 WEEK </td>
                     <?php 
                     
                     $OCCEquipLast3week = "select downtime.*,department.department_nameEN,equipment.equipment_nameEN,COUNT(downtime.department_id )as occurrence 
                     ,sum(corrective_time+cr_load_time)as totalDT,sum(cr_load_time+cra+crb+crc+crd+crj)as timecrusher
                      from downtime 
 left join department on downtime.department_id=department.department_id
 left join equipment on downtime.equipment_id=equipment.equipment_id
 where downtime.plan='Unplan' and downtime_date >=date_sub('$STRdatepicker2',interval 27 day)
and downtime_date <=date_sub('$STRdatepicker2',interval 21 day)
and  downtime.department_id ='$_REQUEST[department_id]'
group by equipment.equipment_id ";
                     
                     $resultOCCEquipLast3w=mysql_db_query($objDB,$OCCEquipLast3week);
                     while($objResultOCCEquipLast3week=mysql_fetch_array($resultOCCEquipLast3w)){
                       $_SESSION[totalDT_Last3week] =round($objResultOCCEquipLast3week[totalDT]/60,1);
                       $_SESSION[totalLoss_Last3week] =round($objResultOCCEquipLast3week[timecrusher]/60,1);
                       $_SESSION[occurrence_Last3week]=$objResultOCCEquipLast3week[occurrence];
                       $totalDT3=$objResultOCCEquipLast3week[totalDT];
                       $totalCR3=$objResultOCCEquipLast3week[timecrusher];



                     ?>
                    
                    <td class="text-right pr10"><?php echo $objResultOCCEquipLast3week[occurrence];?> (<?php echo $objResultOCCEquipLast3week[equipment_nameEN];?>)</td> 
               

                   <?php }?>
                   </tr>

                  

                  </tbody>
                  </table>


ิbondsanti 118.172.110.xxx 25-03-2016 11:55:59

คำแนะนำ และการใช้งาน

สมาชิก กรุณา ล็อกอินเข้าระบบ เพื่อตั้งคำถามใหม่ หรือ ตอบคำถาม สมาชิกใหม่ สมัครสมาชิกได้ที่ สมัครสมาชิก


  • ถาม-ตอบ กรุณา ล็อกอินเข้าระบบ
  • เปลี่ยน


    ( หรือ เข้าใช้งานผ่าน Social Login )

 ความคิดเห็นที่ 1
จำนวนของข้อมูลต้องมีเท่ากับจำนวนหัวข้อถึงจะแสดงตรงหัวข้อมูล
วิธีแก้ก็ตอนเก็บให้เก็บข้อมูลให้ครบตามหัวข้อ ข้อมูลไหนไม่มีก็เก็บเป็นค่าว่าง 


ninenik 180.183.41.xxx 25-03-2016






เว็บไซต์ของเราให้บริการเนื้อหาบทความสำหรับนักพัฒนา โดยพึ่งพารายได้เล็กน้อยจากการแสดงโฆษณา โปรดสนับสนุนเว็บไซต์ของเราด้วยการปิดการใช้งานตัวปิดกั้นโฆษณา (Disable Ads Blocker) ขอบคุณครับ