我有波紋管代碼哪些工作宣佈哪些只加載一條記錄我用循環哪些不起作用。當過要CHEC雖然循環在if語句
<?php
$job="SELECT * from jobs where job_exp_date>=now()";
$query=mysql_query($job);
$result=mysql_fetch_assoc($query);
if($result==0) {
echo "Sorry We Don't have current openings. Thank you for your intreset";
}else{
echo"<table width=\"auto\">
<tr>
<th><p class=\"slide-title\"><strong>Title </strong></p></th>
<th><p class=\"slide-title\"><strong>Location </p></strong></th>
<th><p class=\"slide-title\"><strong>Expiry Date </p></strong></th>
</tr>";
while($result1=mysql_fetch_array($query)){
echo "<tr>
<td>";echo $result1['job_title']; echo "</td>
<td>";echo $result1['job_location']; echo "</td>
<td>";echo $result1['job_exp_date']; echo "</td>
</tr>"; } echo "
</table>";
}
?>
http://stackoverflow.com/questions/2974011/while-row-mysql-fetch-arrayresult-how-many-loops-are-正在執行 – ray
是不是「while($ result1 = mysql_fetch_array($ result))」 – ray