|
|
|
ช่วยหน่อยคะ กำลังจะเขียนphp ให้มันแสดงพื้นที่ในคลังสินค้าอะคะ |
|
|
|
|
|
|
|
<?
include("config.inc.php") ;
mysql_select_db($db) ;
$sql="Select * From product_tb where pstock='$stockcode'";
$db_query=mysql_db_query($db,$sql);
$num_rows=mysql_num_rows($db_query);
$cols = 8; //กำหนดจำนวนคอลั่ม
$colum = $cols;
?>
<table border="1">
<tr>
<?
while($result = mysql_fetch_array($_query)) {
$colum --;
?>
<td width="150">
<?=$result[product_name];?>จำนวน<?=$result[product_amunt];?></td> //ส่วนของการแสดงข้อมูล
<?
if($colum == 0) {
$colum = $cols;
?>
</tr></tr>
<? } } ?>
</tr></table>
ลองดูนะ รู้สึกถามผมไปตั้งนานมาก ให้ไกด์ไปแล้ว คาดว่าคงยัง งง
|
|
|
|
|
Date :
25 พ.ค. 2551 17:51:36 |
By :
deawx |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ชอบคุณมากเลยคะ แต่ขอถาม ไรอีกอย่างนึงนะคะ ถ้าเกิดว่า จะให้แจ้งerror ว่า ไม่สามารถแสดงผล ได้ เนื่องจาก สินค้ามีจำนวนเกิน16กลุ่ม ต้องทำไงหรอคะ
|
|
|
|
|
Date :
25 พ.ค. 2551 20:36:58 |
By :
imagine3230 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|