|
 |
|
การรันลำดับ อยากให้รันเลขลำดับอะครับ พยายามแล้วอะครับได้สักกะที ช่วยหน่อยนะครับ |
|
 |
|
|
 |
 |
|
งง คำถาม
|
 |
 |
 |
 |
Date :
2009-10-01 17:04:25 |
By :
reda_008 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
งงเหมือนกัน
อย่างนี้หรือป่าวครับ
Code (PHP)
<?php
for (expr1; expr2; expr3)
{
...//condition
}
?>
Code (PHP)
<?php
for($i=0;$i<=5;$i++)
{
echo $i." <font size=$i>www.ThaiCreate.Com</font>"."<br>";
}
?>

Ref : PHP for()
|
 |
 |
 |
 |
Date :
2009-10-01 17:12:10 |
By :
pokultra |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอเคลียร์ๆ ครับ รันลำดับอะไร ยังงัย มีโค้ดก็เอามาให้ดู เลยยิ่งดี ครับ
|
 |
 |
 |
 |
Date :
2009-10-01 17:35:47 |
By :
lozomac |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
จขกท
มาให้ข้อมูลเพิ่มเติมด้วยครับ
หลายท่านรอให้การช่วยเหลือ อยู่
ได้หรือไม่ได้งัย แวะมาบอกกันหน่อยนะครับ
  
|
 |
 |
 |
 |
Date :
2009-10-01 18:06:32 |
By :
pokultra |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
สงสัยกลับบ้านไปนอนแล้วล่ะ รอพรุ่งนี้ค่อยมาตอบละกัน
|
 |
 |
 |
 |
Date :
2009-10-01 18:34:53 |
By :
NanoTHoro |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
มารอด้วยคน
|
 |
 |
 |
 |
Date :
2009-10-01 19:07:24 |
By :
Sek-Artdrinker |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
 
|
 |
 |
 |
 |
Date :
2009-10-01 19:13:04 |
By :
reda_008 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
รู้นะว่าพี่เสกนั่งจิบน้ำยาเร่งรากรอ ฮาๆๆๆๆ
|
 |
 |
 |
 |
Date :
2009-10-01 21:06:56 |
By :
NanoTHoro |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
น่าจะเป็น Autoincrement น่ะครับ
|
 |
 |
 |
 |
Date :
2009-10-01 21:34:42 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (PHP)
<?php
// เพิ่มจำนวนลำดับให้ Number
// ---- By P@e. ----
include("connect.inc.php");
$sql_num = "SELECT max(number) FROM table";
$result = mysql_query($sql_num,$con) or die ("ไม่สามารถ Select Number ได้");
while($r = mysql_fetch_array($result))
{//-
if($r != 'null')
{//ถ้าข้อมูลในฟิลด์ที่ select ไม่เท่ากับค่าว่าง
$number = $r["max(number)"]+1;//ให้บวกค่าเพิ่มอีก 1
}
else { $number=1; }
}//-
?>
*** ลองรันดูครับ ผิดพลาดตรงไหนขออภัยด้วย
|
 |
 |
 |
 |
Date :
2009-10-01 21:37:20 |
By :
panyapol |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เขาต้องการให้ตัวเลขวิ่งนะ
run แปลว่า วิ่ง
|
 |
 |
 |
 |
Date :
2009-10-01 23:31:37 |
By :
danya |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
มาแสดงความคิดเห็นส่วนตัวกันเต็มเลยแห่ะ สรุปว่าไม่ใช่สักอัน  
สงสัย จขกท ได้จนไม่มาตอบให้แหล่ะ
|
 |
 |
 |
 |
Date :
2009-10-02 01:12:10 |
By :
xbeginner01 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|

|
 |
 |
 |
 |
Date :
2009-10-02 10:12:16 |
By :
pokultra |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 04
|