Forum Moderators: coopster
<table>
<tr><!--loop start-->
<!--START IF=rownum==4-->
</tr>
<tr>
<!--END IF-->
<!--START IF=rownum==7-->
</tr>
<tr>
<!--END IF-->
<td>content</td>
<!--loop end--></tr>
</table>
I suggest you run your HTML output through a validator as you experiment.
<?
$query="select * from sionvalais where resort=resort";
$result=mysql_query($query)
or die(mysql_error());
echo "";
while ($row=mysql_fetch_object($result))
{
for($i=1; $i<=$numOfImgs; $i ++) {
echo "<img src=\"" . $row->camurl[$i-1] . "\" class=\"fl";
if($i%3 === 0) {
echo " cl";
}
echo "\">";
}
?>
Whenever working with string and date values in MySQL you should specify them as quoted strings:
$query="select * from sionvalais where resort='resort'";
>>There is something not working. $row->camurl is the url of the webcams.
Are you getting an error message, no data returned...? Can you offer more detail?
<?
$query="select * from sionvalais where resort='resort'";
$result=mysql_query($query)
or die(mysql_error());
echo "";
while ($row=mysql_fetch_object($result))
{
for($i=1; $i<=$numOfImgs; $i ++) {
echo '<img src="' . $row->camurl . '" class="fl';;
if($i%3 === 0) {
echo " cl";
}
echo "\">";
}
?>