|
 |
|
แก้ผลการแสดงข้อมูลในตารางที่ล้น ให้เป็น.... ดึงข้อมูลโดยAjax มาแสดงครับ แต่ว่าข้อมูลมันล้อจกตกไป |
|
 |
|
|
 |
 |
|
ลองใช้ตารางช่วย ลองดูครับ
|
 |
 |
 |
 |
Date :
2009-03-04 19:50:22 |
By :
pun05 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ใช้ตารางช่วยอย่างไรครับ
|
 |
 |
 |
 |
Date :
2009-03-05 09:31:17 |
By :
nutkit |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เวลาดึงข้อมูลมาจาก db แล้วให้นำมาแสดงในตาราง แบบสร้างแถวเอง
ผมใช้แบบนี้ครับเคยมีปัญหาเหมือนกัน
บอกตามตรงผมก็พวกมั่วครับ แต่ลองดูเป็นแนวทางจาก code ดูครับ
ผมไม่แน่ใจว่าใช่หรือเปล่า
Code (PHP)
<table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="left"><span class="style86">
<?
$ps=0;
$sql = "SELECT * FROM classified WHERE a1='1' LIMIT 0,10 ";
$query = mysql_db_query($dbname, $sql);
$rows= mysql_num_rows($query);
while ($ps< $rows){
$news = mysql_fetch_array($dbquery_news);
$idcontent = $news['idcontent'];
?>
<br>
</span>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr bgcolor="#FFFFFF">
<td width="40"><div align="center" class=""><img src="/images/b_o1.gif" width="11" height="11"> </div></td>
<td width="1199" valign="top"><div align="left" class=""><span class="style106"><? echo "$xxxxxxx";?></span></div></td>
</tr>
</table>
<span class="style86 style118"> </span> </div>
<span class="style86 style118">
<?
$ps++;
}
?>
</span></td>
</tr>
</table>
|
 |
 |
 |
 |
Date :
2009-03-05 10:06:29 |
By :
pun05 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
กำหนดขนาดข้อความในการแสดงผล และให้ ใช้การตัดคำเอาครับ substr นะครับ ไม่งั้นก็ แก้ ขนาด table รู้สึกว่าอยู่ที่ ไฟล์ css ลองดูครับ
|
 |
 |
 |
 |
Date :
2009-06-03 13:43:11 |
By :
tapi |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ถ้ายังอยากใช้ div ให้ใช้ display:table-cell ช่วยและ fix width ด้วย
|
 |
 |
 |
 |
Date :
2009-06-03 19:20:26 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 05
|