How can I limit the # of results displayed from a recordset

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
MartinMar52011
Forum Newbie
Posts: 2
Joined: Sat Mar 05, 2011 6:25 pm

How can I limit the # of results displayed from a recordset

Post by MartinMar52011 »

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.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: How can I limit the # of results displayed from a record

Post by califdon »

You will do yourself a big favor if you will post this in the Javascript forum with a Subject line that includes "Adobe Spry". I had to look it up to find out what your code was even doing. It has little to do with PHP.
Post Reply