|
 |
|
รบกวนด้วยครับ การดึงค่าจากฐานข้อมูลมาแสดงผลแล้วค่าไม่ตรงกับค่าที่ต้องการให้แสดงครับ |
|
 |
|
|
 |
 |
|
ภาพที่ต้องการให้แสดงผลครับ

ฐานข้อมูลครับ

Code (PHP)
<table class="table table-striped">
<?
$link = mysqli_connect("$hostname","$username","$password","$database");
$queryYe = "SELECT * FROM yearedu WHERE Yeae_End >= '".date("Y-m-d")."' ";
$resultYe = mysqli_query($link, $queryYe);
$rowYe = mysqli_fetch_array($resultYe, MYSQLI_ASSOC);
$rowYe["Yeae_ID"];
//echo date("D");
$queryYd = "SELECT * FROM days WHERE Day_Eng = '".date("D")."' ";
$resultYd = mysqli_query($link, $queryYd);
$rowYd = mysqli_fetch_array($resultYd, MYSQLI_ASSOC);
$rowYd["Day_ID"];
//$link = mysqli_connect("$hostname","$username","$password","$database");
$query = "SELECT * FROM schedstu where SchD_ID='".$_REQUEST["SchD_ID"]."' group by SchS_Day ";
if ($result = mysqli_query($link, $query)) { ?>
<thead>
<tr>
<th>#</th>
<th>ชื่อ - สกุล</th>
<?
while ($obj = mysqli_fetch_object($result)) {
?>
<th><?=$obj->SchS_Day; ?></th>
<? }mysqli_free_result($result);}
?>
</tr>
</thead>
<tbody>
<?
$query = "SELECT * FROM schedstu where SchD_ID='".$_REQUEST["SchD_ID"]."' ";
if ($result = mysqli_query($link, $query)) {
while ($obj = mysqli_fetch_object($result)) {
?>
<tr>
<td><?=++$ob;?></td>
<td><?=$obj->Stu_Code;?></td>
<?
?>
<td><?=$obj->SchS_Value; ?></td>
</tr>
<? } mysqli_free_result($result); }
mysqli_close($link);
?>
</tbody>
</table>
Tag : PHP, MySQL, IIS

|
|
 |
 |
 |
 |
Date :
2017-10-13 17:12:07 |
By :
msookurb |
View :
890 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ตัวอย่างคำถามที่เกือบจะ perfect บอกแต่ความต้องการ ไม่แจ้งผลลัพธ์ปัจจุบัน
ปัญหาลักษณะนี้ โดยปกติจะอยู่ที่การแทนค่าแบบ dynamic
หรือ ตัวแปรของ php ใส่ไม่ตรงกับ html element
|
 |
 |
 |
 |
Date :
2020-07-30 13:00:19 |
By :
PhrayaDev |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 02
|