On 06/05/2008 11:36 PM, Todd Richards wrote:
> Hey Everyone -
> 
> I'm having a brain lapse here and can't figure out the "right" way to do
> this.  On a home page, I have "Upcoming Events" with a box floating to the
> right  that will show the next 5 events.  I was trying to use "rs.pagesize =
> 5" but for some reason it's not working (although it is in another site).
> So instead, I simply added a 
> 
>        <% if page_count <=5 then %>  (page_count is defined higher up and is
> incremented during the while statement)
> 
>               Code to show the event
> 
>       <% end if %>
> 
> This seems to work, but it's probably not very efficient.  Any thoughts?

Where are these events coming from?

If they're coming from a database, you'd be a lot better off just
telling the database you only want 5 records (by adding "LIMIT 5" to the
query) rather than retrieving a full set, displaying the first 5 and
throwing the rest away!


____ • The WDVL Discussion List from WDVL.COM • ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
       Send Your Posts To: [email protected]
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.

Reply via email to