» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > ASP forums and Tips

ASP forums and Tips Talk about ASP Scripting. .net and Cold Fusion as well.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-22-2006, 03:19 PM
sniffer sniffer is offline
OSP Starters
 
Join Date: Aug 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
sniffer is on a distinguished road
Default records in table

Hi

I have an Access db and I want to display the records in the database in a table. I want to display 5 records on each row, so first it loop through the database and pick the 5 first records and then it creates a new row and pick the next 5 records etc.. So when it have picked out, say 15 records I want it to create a new page and the show the rest of the records on the second page, a paging system.

I have tested differents methods but without any results.

I would be grateful if someone can help me with this. -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 08-22-2006, 03:20 PM
ivory ivory is offline
OSP Starters
 
Join Date: Jun 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
ivory is on a distinguished road
Default

you need to create an incremental loop that counts up as you step through your recordset - and use an if...then statement to draw your cell/row opening and closing tags every 5 records.

something like
<table>
<%
i = 0 'your incremental loop - define it outside your recordset loop
while not recordset.eof 'start your recordset loop
if i = 0 or i mod 5 = 0 then
'insert your html to open the row/first cell
else
'insert your html to open the 2nd, 3rd, 4th, or 5th cell
end if
'display your recordset content
i = i + 1 'step up your incremental loop by 1.
if i = 0 or i mod 5 = 0 then
'insert your html to close the row/last cell
else
'insert your html to close the 1st, 2nd, 3rd, or 4th cell
end if
recordset.movenext 'proceed to the next record in the recordset.
wend
%>
</table>

and then create a link to the n -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to add posts to a phpbb table after moving servers. tanny MySQL Forums 3 02-13-2007 03:44 PM
Question about combining two DB records into one ASP Table richardson ASP forums and Tips 1 08-29-2006 02:35 PM
Question about combining two DB records into one ASP Table richardson ASP forums and Tips 0 08-29-2006 02:34 PM
error= #1036 - Table 'table' is read only futuristic PHP Programming and Tips 1 08-12-2006 10:21 AM
specify the limit of records that can be entered in the table rement MySQL Forums 1 08-11-2006 03:03 PM


All times are GMT. The time now is 09:10 PM.