Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 cross referencing?
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

laser
Advanced Member

Australia
3859 Posts

Posted - 03 November 2003 :  23:30:15  Show Profile
on here http://www.ggholiday.com/bg/forums/DECORATED.asp

I see 3 members : Avenger, Rommel and Raspootin

Raspootin has 1 medal, the others have 4.
Go to Top of Page

Alfred
Senior Member

USA
1527 Posts

Posted - 03 November 2003 :  23:42:50  Show Profile  Visit Alfred's Homepage
That is what it should be, but what you see is just written manually in htm code.
Our true asp file does ignore Avenger (see my above post).

Alfred
The Battle Group
CREDO
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 03 November 2003 :  23:46:48  Show Profile
I think we need a url - decorated.txt does not match the results on the decorated.asp page.

What does currid do ? I don't know
Go to Top of Page

Alfred
Senior Member

USA
1527 Posts

Posted - 04 November 2003 :  00:00:40  Show Profile  Visit Alfred's Homepage
That is because our deorated.asp file is not on the server.
What you see is just htm code.
I updated the txt file.

"currid" is part of your code of a while back, when we tried to solve the medal display task. It makes sure that each name only shows up once.

Alfred
The Battle Group
CREDO
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 04 November 2003 :  00:09:08  Show Profile
comment out the red line you have in your post above.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 04 November 2003 :  00:12:47  Show Profile
Alfred, "currid" is not doing anything ... it is simply set to mymedalMembers("member_id") and then compared to it.

I think for any custom code problem, you need to supply a txt and asp version of the file. We're now onto a completely different problem that we started off with
Go to Top of Page

Alfred
Senior Member

USA
1527 Posts

Posted - 04 November 2003 :  00:24:45  Show Profile  Visit Alfred's Homepage
Laser, currid was part of the code you wrote some time ago for the other file, which was supposed to prevent a name to be listed more than once.

Commenting it out enables all three names to show now.
I don't really know why it was needed in the other block of code.

Anyway, Nikkol spotted it - thanks, Lady Hawkeye!

I'll try and upload the file now to the server and replace the phony decorated.asp (which is really htm code only).

PS.: Works fine and looks good now. In the old file I had the names as links to the member's profiles - would that be difficult here?

I tried this:
quote:
strPlayerName = myMedalMembers("M_NAME")
numPLayerID = GetMemberID(strPlayerName)
but it gave me a "type mismatch" error.

Alfred
The Battle Group
CREDO

Edited by - Alfred on 04 November 2003 01:24:38
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 04 November 2003 :  01:45:05  Show Profile
Alfred, you make it pretty hard to help you at times Anywaym here goes ...

If you are using the original SQL statement we were fixing, namely :

strSql = "SELECT MEMBER_MEDALS.MEMBER_ID, MEMBER_MEDALS.MEDAL_NAME, FORUM_MEMBERS.M_NAME FROM FORUM_MEMBERS INNER JOIN MEMBER_MEDALS ON FORUM_MEMBERS.MEMBER_ID = MEMBER_MEDALS.MEMBER_ID;"

Then you already have the MEMBER_ID. On top of that, you don't have a GetMemberID function defined in this ASP file (which is the error you are getting now). SO, you could easily achieve what you want to do by creating a link like this :

http://forum.snitz.com/forum/pop_profile.asp?mode=display&id=25525

Obviously using your url & MEMBER_ID
Go to Top of Page

Alfred
Senior Member

USA
1527 Posts

Posted - 04 November 2003 :  11:46:56  Show Profile  Visit Alfred's Homepage
I am really sorry, laser, because that is exactly what I try to avoid. It is always my intention to go out of my way to make sure my questions are clear, and I also try to show what I tried and what part I don't understand. And I certainly always express my appreciation.

So, to come back to the subject, I understood that we already have the member's name with myMedalMember("M_NAME"), but wasn't sure whether I needed to write that second line (numPLayerID) as well.
I now understand how to do it, and defined it going properly!
At first I had placed it outside the loop, which of course gave me the same name and ID for all records, then I realized it has to go inside the loop, after the "If currid <> mymedalMembers("member_id") then" condition.
This works now:
quote:
do while not myMedalMembers.eof
If currid <> mymedalMembers("member_id") then
strPlayerName = myMedalMembers("M_NAME") '## to set up links in names ################
numPLayerID = myMedalMembers("MEMBER_ID") '###########################################
response.write "<body bgcolor=""#6600FF""><br><div align=""center"">"
response.write "<table bgcolor=""#37008A"" border=""5"" cellpadding=""5"" cellspacing=""0"" style=""border-collapse: collapse"" bordercolorlight=""#FFFFCC"" bordercolordark=""#666600"" bgcolor=""#000000"">"
response.write "<tr><td width=""100%"" align=""center"">"
response.write profileLink(strPlayerName, numPlayerID)
'myMEDALMembers("M_NAME") & "</font>" 'this works without links
response.write "<font size=""2""> / <i>" & myMEDALMembers("M_COUNTRY") & "<br><br>"
response.write DisplayMedalIcon(myMedalMembers("member_id"))
response.write "</td></tr></table></center></div>"
currid = mymedalMembers("member_id")
End If
myMedalMembers.movenext
if not myMedalMembers.EOF then
End If
loop
and looks and functions terrific! http://www.ggholiday.com/bg/forums/decorated.asp

I am learning constantly, and happy as a clam that I can do more things myself every time you guys help me solve a puzzle!
Really looking forward to the day when I can help some poor soul with a simple problem!
Meanwhile, if you don't hear from me for a while, it means I am successfully doing things I learned here! Many thanks to all!

Alfred
The Battle Group
CREDO
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.7 seconds. Powered By: Snitz Forums 2000 Version 3.4.07