If my code displays a recordset, how can I limit the number of results to display?

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>
           <td height="40" align="center">{name}</td>
          </tr>
          </table>
      </div>
At the moment the green line prints the names in one column of a table, and the orange line prints the same list again.
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.

I am assuming that you have created a SpryHTMLDataSet from the table produced from the PHP-code.
To display the result in two columns, use CSS as follows
<!DOCTYPE HTML>
<html xmlns:spry="http://ns.adobe.com/spry">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<script src="SpryAssets/xpath.js" type="text/javascript"></script>
<script src="SpryAssets/SpryData.js" type="text/javascript"></script>
<script type="text/javascript">
var ds1 = new Spry.Data.XMLDataSet("employees.xml", "employees/employee");
</script>
<style>
.RowContainer {
    width: 400px;
.RowColumn {
    width: 50%;
    float: left;
</style>
</head>
<body>
<div spry:region="ds1">
  <div spry:repeat="ds1" class="RowContainer">
    <div class="RowColumn">{firstname} {lastname}</div>
  </div>
</div>
</body>
</html>
In the example above I have use a SpryXMLDataSet but the principle remains the same. The used XML file is as follows
<?xml version="1.0" encoding="iso-8859-1"?>
<employees>
    <employee id="123456">
        <lastname>Smith</lastname>
        <firstname>Edward</firstname>
        <joinDate>2009-10-01</joinDate>
    </employee>
    <employee id="127937">
        <lastname>Johnson</lastname>
        <firstname>Neil</firstname>
        <joinDate>2011-03-06</joinDate>
    </employee>
    <employee id="126474">
        <lastname>Williams</lastname>
        <firstname>Steve</firstname>
        <joinDate>2011-03-20</joinDate>
    </employee>
    <employee id="120585">
        <lastname>Jones</lastname>
        <firstname>John</firstname>
        <joinDate>2010-12-13</joinDate>
    </employee>
    <employee id="127493">
        <lastname>Brown</lastname>
        <firstname>Joe</firstname>
        <joinDate>2011-01-01</joinDate>
    </employee>
</employees>
Gramps

Similar Messages

  • How can I limit the number of emails retained on my ipad air?

    How can I limit the number of emails that are retained on my iPad Air?  Because of legal requirements of a long-term project, I cannot permanently delete emails relating to that project from my ISP's mail server.  My gmail account contains over 17,000 emails and, upon setting up my new iPad, and updating to ios 7.1.1, I now have all 17,000+ emails taking up space.  I would like to limit the emails by count as I was able to do on my old iPad running ios 5.1.1 OR to retain them based on date range.  I have not found any instructions on the support discussions or general iPad blogs that allow me to do that.  Any way around this problem?
    I also miss the 5.1.1 mail search feature that allowed me to narrow the search by from/to/subject/all.  Does anyone know if that feature is available using some little-known ios 7.1.1 feature?
    Thanks for your help.

    jlfcba wrote:
    IOS 7.1.1 doesn't show a "days to sync" parameter anywhere in SETTINGS/Mail,Contacts,Calendars/ACCOUNTS/GMAIL Account/ GMAIL Acccount Info.  There is nothing in iTunes relating to such an option either.  So, it seems I'm back to square one.
    If you have a decent mail provider like Microsoft Hotmail or Outlook.com mail it does.
    If you have Gmail it does not.  Quite right. Gmail is rubbish.

  • HT2729 I have limited space on my new ipad. How can I limit the number of songs from my itunes on my imac from going to my ipad when I connect the two?

    I have limited space on my new ipad. How can I limit the number of songs from my itunes on my imac from going to my ipad when I connect the two?

    you can do this by keeping the external hard drive connected and doing the following
    -hold shift key down on computer while opening iTunes and a prompt will appear to choose a library
    -select choose library, iTunes should bring up your explorer windows where you can search for the external HD
    -after you find the external HD find the iTunes folder you just copied to it
    -after opening the iTunes folder look for the file that says iTunes library.itl or if you can't see that extenstion just look for a document looking thing in the iTunes folder that shows up as a database file
    -double click the database file and boom iTunes should load your library without having to copy it to the computer
    PS: do make sure that if you are going to do it this way, make sure that the external HD is connected at all times, because if you don't then you will get exclamation marks next to your iTunes songs
    double PS: if you are unsure how to find out if the iTunes library file is a database file just right click it and choose properties and under the type it should say database file
    hope this helps:)

  • Hi, how can I limit the number of emails I can see on my iPhone 5. Every time in delete one and older email gets added from my live.co.uk account (where I want to keep my 2500 emails) I just don't want many on my phone. Thanks

    Hi, how can I limit the number of emails I can see on my iPhone 5. Every time in delete one and older email gets added from my live.co.uk account (where I want to keep my 2500 emails) I just don't want many on my phone. Thanks

    You can't. Why on earth would you attempt to manage 2500 emails with setting up a folder structure or some means of doing so? Simply keeping them in an single inbox is not realistic, no matter what email client you use.

  • How can I limit the number of rows returned by a select stat

    How can I limit the number of rows returned by a select
    statement. I have a query where I return the number of stores
    that are located in a given area.. I only want to return the
    first twenty-five stores. In some instances there may be over
    200 stores in a given location.
    I know is SQL 7 that I can set the pagesize to be 25....
    Anything similiar in Oracle 8i?
    null

    Debbie (guest) wrote:
    : Chad Nale (guest) wrote:
    : : How can I limit the number of rows returned by a select
    : : statement. I have a query where I return the number of
    : stores
    : : that are located in a given area.. I only want to return the
    : : first twenty-five stores. In some instances there may be
    : over
    : : 200 stores in a given location.
    : : I know is SQL 7 that I can set the pagesize to be 25....
    : : Anything similiar in Oracle 8i?
    : If you are in Sql*Plus, you could add the statement
    : WHERE rownum <= 25
    : Used together with an appropriate ORDER BY you
    : could get the first 25 stores.
    Watch out. ROWNUM is run before ORDER BY so this would only
    order the 25 selected
    null

  • How can I limit the number of emails resident in Apple Mail?

    How can I limit the number of emails resident in Apple Mail inbox?

    jlfcba wrote:
    IOS 7.1.1 doesn't show a "days to sync" parameter anywhere in SETTINGS/Mail,Contacts,Calendars/ACCOUNTS/GMAIL Account/ GMAIL Acccount Info.  There is nothing in iTunes relating to such an option either.  So, it seems I'm back to square one.
    If you have a decent mail provider like Microsoft Hotmail or Outlook.com mail it does.
    If you have Gmail it does not.  Quite right. Gmail is rubbish.

  • How can i limit the number of taps that open in safari

    How can i limit the number of tabs that open in safari

    preferences-->tabs
    change new pages to never open in new tabs.
    Now you only get the number of tabs that you open yourself with command-T or the new tab button.

  • How can i set the number of results that can be displayed on the page

    hello im just wondering how i can set the numebr of results that can be dispaleyd on the jsp, when the there are more than 5 results i want the suer to press more
    how is this odne could anyone send me a example code?
    and also how can i get results from the query displayed as select list options, so that when they press one of teh results it goes to correspnding page
    Thank you

    Hi,
    I assume that you have the connection to the DB.
    You can try this code.
    Statement stmt = con.createStatement();
    String sql = "<some sql code for selecting>";
    ResultSet rs = stmt.executeQuery(sql);
    rs.last();
    int count = rs.getRow(); // this is the number that shows how many numbers you have after select query
    rs.first(); //we moved cursor again to the begining of the results.
    if (count > 5) {
    for (int i=0;i<5;i++) {
      //as an example
      rs.getString(0);
      rs.getString(1);
      rs.getString(2);
    out.print("<a href='morePage.jsp'>More</a>");
    else {
    for (int i=0;i<count;i++){
      //as an example
      rs.getString(0);
      rs.getString(1);
      rs.getString(2);
    rs.close();
    stmt.close();I hope this would help you.
    If you have problems let me know..
    Ismail TURK

  • How can I limit the number of messages coming into my email accounts on the IOS7

    I don't like the new IOS7 system most annoying is the excess battery useage and need to recharge the other is I can no longer limit the number of emails that are in my cell's email accounts old system let you choose the amount of messages. 
    already did the basic things to eliminate battery drainiage getting rid of open pages which was also annoying to figure out how to use as you can't simply click and hold then delete all open apps running in the back ground you must touch and slide them off the phone. I don't let apps do auto updates.
    They need to do something about the battery and having to have all emails on the phone which likely is sucking up space.
    Any suggestions?

    I don't think it matters what you use as your email client. This is a feature that existed before and was missed in the upgrade to IOS 7. I read on another post that if you contact Apple support they just tell you to report it in Apple feedback.  I just submitted feedback at http://www.apple.com/feedback/  I couldn't find an IOS section to post it to, so I just posted it in the iPhone section. Maybe if enough people do this, Apple will fix it.

  • How can I limit the number of ros in TextArea?

    As I turn on the line wrap and having used setRows method,
    I cannot limit the number of rows of the textarea into 2.
    How can I limit it?
    Thanks.

    camickr wrote:
    I give up. You don't know specify requirements and I'm not going to prompt you every 5 minutes for more information.
    due to setText method So this implies that the text comes from somewhere, maybe a database, but the user does not type the text directly into the text area.
    If you define the text area with 2 rows, then the third row will not be visible, so I don't see the problem. Just don't add the text area to a scroll pane and the user will never know the third row is there.[http://i188.photobucket.com/albums/z55/nwoedf/temp/error.png ]
    it demonstrates the problem with excess line
    The third row is still visible even I have used setRow(2).

  • How can I limit the number of attempts to print a web page

    Hi I'm trying to find a resolution for an issue on our network.
    We run several kiosk machines that allow customers to print out documents and web pages. However we are finding that we waste a lot of ink due to user's frequently sending the same print task to the printers.
    Just yesterday we had someone print out over 70 pages because they just keep clicking print.
    I've tried looking for an add-on that would address this but was not able to find one.
    My question is this, Is there an internal setting that can be changed in firefox to limit the number of print attempts to say once every 30 seconds, or even a way to make a dialogue box come on screen saying that the print request is currently processing and not allow more printing until the current task is completed.

    Sorry, there is no setting within Firefox to prevent that from happening. Once the user sees the "native print dialog" box (what is seen when you do Ctrl + P to initiate printing), the operating system and the printer drivers take it from there.
    I have seen something similar to that on kiosk / rental PC's in FedEx Office stores, that notify the user of the cost per page the user wants to send to a printer, and if the user should happen to click again to print the same pages again it asked if you want to spend another $x.xx to print a second copy. Wouldn't be too much different to just shut off the printing of multiple copies of the same document and notify the user of that action.
    My advice is to discuss that with whoever set up those kiosks to being with.

  • How can I limit the number of emails on my device with a POP account. Thousands of old emails keep loading, no way to rid them, without deleting each one! Using up all my storage on device! Crazy! Help!

    Help, where is the limiting selection for the number of messages to retain on device? How can I get rid of old, read, messages? Just a problem since upgrade to new ios7

    jlfcba wrote:
    IOS 7.1.1 doesn't show a "days to sync" parameter anywhere in SETTINGS/Mail,Contacts,Calendars/ACCOUNTS/GMAIL Account/ GMAIL Acccount Info.  There is nothing in iTunes relating to such an option either.  So, it seems I'm back to square one.
    If you have a decent mail provider like Microsoft Hotmail or Outlook.com mail it does.
    If you have Gmail it does not.  Quite right. Gmail is rubbish.

  • How can I limit the number of rows in Oracle?

    Hi All,
    I am using very complex query where I join 6 table to fetch data from database.
    I have requirement like fetching a first 10000 row and then fetching another records after 10000 and so on.
    I just want to know how to fetch a limited number of rows using sql query. Moreover, I also want to know how to calculate the total number of row (alternative of count method because I don't want to query the database twice because its affect the performance).
    Thanks in advance.
    Regards,
    Sunny

    sunny@oimnewbie wrote:
    Hi All,
    I am using very complex query where I join 6 table to fetch data from database.
    I have requirement like fetching a first 10000 row and then fetching another records after 10000 and so on.
    I just want to know how to fetch a limited number of rows using sql query. Moreover, I also want to know how to calculate the total number of row (alternative of count method because I don't want to query the database twice because its affect the performance).
    Thanks in advance.
    Regards,
    SunnyThis smells like a very fishy requirement based on a fundamental misunderstanding of how Oracle works. Could you explain why you want to arbitrarily limit the result set to 1000 rows? What will happen between that and getting the "next" 1000? What triggers getting the "next" 1000? and how do you define "next", since there is no ordering in a heap table.
    I suspect we can make that requirement go away be presenting a better approach to the real issue.

  • How can I limit the number of simultaneous downloads on my Mac?

    Hi Everyone,
    I'm using an old Powerbook G4 runnnig 10.4.11.
    Whenever I'm downloading a large number of files simultaneously, my OS insists on downloading them all at the same time. When I've got 50+ files coming in, it gets kind of messy and makes it hard to use the internet. Everything slows down.
    It seems to me there should be a preference somewhere that will allow me to enter a number which would be the max number of files being actively downloaded. The rest of the files beyond this number would be in "queue" state, waiting their turn.
    You know ... if I'm clicking on 50 files to download, I only want two or three of them downloading at one time. The rest can wait their turn.
    Darned if I can find such a pref, though.
    Does 10.4.11 have such a feature that will allow me to have only a small number of files actually downloading and the rest of them queued up?
    -JOHN
    ps. By the way, I'm using Firefox. I don't find any such pref in Firefox, either.

    Thank you for the reply. I had no idea I had so much access to Firefox prefs.
    It's still a strange design though. Yep, the original setting was set to 30 simultaneous downloads. I set it to four, which would see to make my Mac more usable as four downloads are rolling while all the rest are in queue.
    Only probably is, Firefox doesn't just think of what is in the download list as a "download". Once all four downloads are rolling, no more webpages will open! (Strangely, sometimes they will, but very slowly ... but usually not at all.)
    Apparently, even a browser tab is a "download" and is stopped once the assigned number of simultaneous downloads is reached.
    So I'm still back to not being able to limit my downloads for the benefit of having good use of my browser while downloads are coming in.
    Right now, one pages where I have boo-koo downloads I want to initiate at one time, I'm clicking "download", starting the download, going to the downloads list, pausing it, getting another download, pausing it, and so on until I have a complete queue ready to go. Then I start the downloads once I know that I no longer need the internet.
    That seems sort of for the birds, doesn't it?
    Does anyone have any suggestions? Other specialized download programs get the concept of an active queue and a paused queue with a number-setting to determine the max downloads. Why doesn't Firefox get this? Or does it and have I just still not found it?

  • How do i limit the number of simultaneous downloads to my ipod touch?

    I just purchased a new ipod touch and want to dump my entire icloud library onto it.  I figured the easiest way to do this would be to make a smart playlist that includes all my music and then just download the whole playlist (thousands of songs).  The problem is, at about 2/3 of the way through a track, the ipod touch automatically starts downloading the next track. At this point, it's trying to download about 50 tracks simultaneously and as a result is taking abotu 5 minutes to download one song.  How can I limit the number of simultaneous downloads?  Is there a faster way to load up a new ipod touch with your icloud library?  Thanks.

    Thank you for the reply. I had no idea I had so much access to Firefox prefs.
    It's still a strange design though. Yep, the original setting was set to 30 simultaneous downloads. I set it to four, which would see to make my Mac more usable as four downloads are rolling while all the rest are in queue.
    Only probably is, Firefox doesn't just think of what is in the download list as a "download". Once all four downloads are rolling, no more webpages will open! (Strangely, sometimes they will, but very slowly ... but usually not at all.)
    Apparently, even a browser tab is a "download" and is stopped once the assigned number of simultaneous downloads is reached.
    So I'm still back to not being able to limit my downloads for the benefit of having good use of my browser while downloads are coming in.
    Right now, one pages where I have boo-koo downloads I want to initiate at one time, I'm clicking "download", starting the download, going to the downloads list, pausing it, getting another download, pausing it, and so on until I have a complete queue ready to go. Then I start the downloads once I know that I no longer need the internet.
    That seems sort of for the birds, doesn't it?
    Does anyone have any suggestions? Other specialized download programs get the concept of an active queue and a paused queue with a number-setting to determine the max downloads. Why doesn't Firefox get this? Or does it and have I just still not found it?

Maybe you are looking for

  • Inline item mx:Image ... in mx:itemRenderer could not see the defination of method

    I have following code and got a compilation error ("possiblely called an undefined function") because the <mx:Image ...> in the <mx:itemRenderer > could not see the defination of "aMethod" method: <mx:Form ....> <mx:Script><![CDATA[ private function

  • Error during log on to GUI 720

    Hi Experts, I am having problems logging on to my newly installed ERP (on my stand alone system via a virtual machine- Oracle virtual box) via gui 720, I keep getting the following message: partner' 192.168.0.28' not reached WSAECONNREFUSED Regads. B

  • Interface without a source datastore

    I have to transform Data from a DBView into an XML (based on an XML schema). On reverse-engineering the XML schema, it generated 4 data stores. For successful generation of an XML file based on this schema, these data stores should be populated. Of t

  • Alt text doesn't convert from PPT to PDF

    We're trying to create accessible PDFs (and have done so in the past). Two different people are trying -- one gets no alt text in the PDF, and the other gets single image alt text, but no alt text on grouped items. Any suggestions?

  • Ical and Clip Art

    Help please... is there a way to look at a Ical month calendar and see a clipart in a day view pane? EXAMPLE: For May 20th, my sister's birthday... can I put a "Birthday Cake" clip art in that date so it shows while looking at the month calendar?