for ($i=o ; $i < $num.length($i);$i++)
{
select * from where id= $id
$i++; ?? จนปัญญา แล้วค่ะ ช่วยหน่อยได้มั้ยค่ะ
}
Tag : PHP, MySQL
Date :
2012-09-29 13:56:48
By :
sayno
View :
903
Reply :
4
No. 1
Guest
Code (PHP)
$sql = "select name,amount from tablename where amount >= 0 order by name asc";
$rs = mysql_query($sql,$conn) or die ("Error Query [".$sql."]");
while ($objResult = mysql_fetch_array($rs)){
for($i=1; $i <= $objResult["amount"];$i++){
echo $objResult["name"]."<br>";
}
}