How can I limit the # of results displayed from a recordset
Posted: Sat Mar 05, 2011 6:33 pm
I have the code below:
---------------------------------------------------------------------- ------------------------------------
<div id="content">
<table width="998" border="0" cellspacing="4" id="stuff">
<?php do { ?>
<tr>
<td><?php echo $row_Recordset1['name']; ?></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
<div id="spryTable" spry:region="ds1">
<table align="center">
<tr>
<th spry:sort="name"> </th>
</tr>
<tr spry:repeat="ds1" spry:setrow="ds1" spry:hover="hover" spry:select="selected">
<td height="40" align="center">{name}</td> // green line
<td height="40" align="center">{name}</td> //orange line
</tr>
</table>
</div>
---------------------------------------------------------------------- --------------------------------
At the moment the green line of code will display the entire record of names, and the orange line displays the entire record again in another column of the table.
The problem is, I want half the names to be printed in one column and the other half of names to be displayed in the other column.
Can someone show me how to set the php code to do this? I've been trying various things for a while now without success.
Thank you.
---------------------------------------------------------------------- ------------------------------------
<div id="content">
<table width="998" border="0" cellspacing="4" id="stuff">
<?php do { ?>
<tr>
<td><?php echo $row_Recordset1['name']; ?></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
<div id="spryTable" spry:region="ds1">
<table align="center">
<tr>
<th spry:sort="name"> </th>
</tr>
<tr spry:repeat="ds1" spry:setrow="ds1" spry:hover="hover" spry:select="selected">
<td height="40" align="center">{name}</td> // green line
<td height="40" align="center">{name}</td> //orange line
</tr>
</table>
</div>
---------------------------------------------------------------------- --------------------------------
At the moment the green line of code will display the entire record of names, and the orange line displays the entire record again in another column of the table.
The problem is, I want half the names to be printed in one column and the other half of names to be displayed in the other column.
Can someone show me how to set the php code to do this? I've been trying various things for a while now without success.
Thank you.