ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 30th, 2006, 05:32 PM
mpempe mpempe is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 3 mpempe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 25 m 36 sec
Reputation Power: 0
Top ten script

Ihave write a script to present in my page the ten songs with the best voting
Is all ok
This is my code who present the 10 best voting sonks

Code:
<table border="1" size="640">
<tr>
  <td width="80">  No </td>
  <td width="200"> Title</td>
  <td width="200">Song</td>
  <td width="80" > Vote</td>
  <td idth="80" >Vote Level</td>
</tr>
<%
sqlString = "SELECT TOP 10 votes_id, votes_title, votes_date, votes_artist, votes_number, votes_level FROM votes " &_
  "ORDER BY votes_level DESC"
SET RS = Con.Execute( sqlString )
DIM iRecordCount
iRecordCount = 0
'οι εγγραφές που θα εμφανίζονται
DO WHILE NOT RS.EOF and iRecordCount <> 10

%>
<tr>
    <td>1</td>
    <td ><%=RS( "votes_title" )%></td>
    <td ><%=RS( "votes_artist" )%></td>
    <td ><a href="?renewal=1&productID=<%=RS("votes_id")%>" onclick="return confirmRenewal(<%=RS("votes_number")%>)">Ψήφος</a></td>
    <td ><%=RS("votes_level")%></td>

<%
iRecordCount = iRecordCount + 1
RS.MoveNext
Loop

RS.Close
Set RS = Nothing
Con.Close
Set Con = Nothing
%>



My problem is i cant make the first calumn to display the numbers 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
The numbers have to constant

is it possible?

Sorry for my bad english

Reply With Quote
  #2  
Old August 31st, 2006, 09:00 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,886 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 19 m 35 sec
Reputation Power: 18
Instead of this:
<td>1</td>

Try this:
<td><%= (recordCount+1) %></td>


I also advise changing the DO statement to this:
DO WHILE NOT RS.EOF and iRecordCount < 10

No real reason, it just feels better =)
__________________
Daryl's Homepage | My Blogroll | My Profile | Firefox supporter!
DevArticles Forum Moderator

"The net is a waste of time, and that's exactly what's right about it." -- William Gibson

Reply With Quote
  #3  
Old August 31st, 2006, 06:17 PM
mpempe mpempe is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 3 mpempe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 25 m 36 sec
Reputation Power: 0
i have replace the
<td>1</td>
with
<%= (recordCount+1) %>

but i have only 1
1
1
1
1
1
1
1

Reply With Quote
  #4  
Old September 1st, 2006, 10:07 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,886 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 19 m 35 sec
Reputation Power: 18
my mistake, it should have been iRecordCount

Reply With Quote
  #5  
Old September 1st, 2006, 05:31 PM
mpempe mpempe is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 3 mpempe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 25 m 36 sec
Reputation Power: 0
yes yes
thats it

thank you MadCowDzz

you help me very much

thnks

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > Top ten script


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap