lazlo2005 wrote:
> using the mysql_data_seek($cand, 0); method, on
subsequent repeated regions,
> I'm experiencing a blank line
It's because of the way that Dreamweaver creates recordsets
and repeat
regions. A Dreamweaver repeat region uses a do... while loop
like this:
<?php do { ?>
<tr>
<td><?php echo $row_recordsetName['name'];
?></td>
</tr>
<?php } while ($row_recordsetName =
mysql_fetch_assoc($recordsetName)); ?>
This is works because the recordset code above the DOCTYPE
automatically
retrieves the first row. However, when you use
mysql_data_seek(), you
need to get the first row yourself like this:
<?php
// reset the recordset back to the first item
mysql_data_seek($recordsetName, 0);
// get the first row
$row_recordsetName = mysql_fetch_assoc($recordsetName);
// then use the Dreamweaver repeat region code
?>
<?php do { ?>
<tr>
<td><?php echo $row_recordsetName['name'];
?></td>
</tr>
<?php } while ($row_recordsetName =
mysql_fetch_assoc($recordsetName)); ?>
--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/