Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-02-2002, 12:04 AM   PM User | #1
MrJL
New Coder

 
Join Date: Jun 2002
Location: Central Ohio
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
MrJL is an unknown quantity at this point
If Then Else contained in Loop

Ok, I'm sure there some elementary mistake I'm making in my logic here, but here's my code:

Code:
<%
while not infoRS.eof
	IF State = infoRS.fields("state") THEN
	response.write "<tr><td>&nbsp;</td><td>" & infoRS.fields("city") & "</td></tr>" 
	ELSE
	Set State = infoRS.fields("state")
	response.write "<tr><td>" & infoRS.fields("state") &"</td><td>" & infoRS.fields("city") & "</td></tr>" 
	END IF
infoRS.movenext	
wend
%>
And instead of getting a nicely laid out table where I have one state, multiple cities, and then another state listed, with more cities...

I have one state listed at the top left, and every city listed. No more states. Here's the page: http://www.mickeysguidingstuff.net/p...es/content.asp

Far warning, it cycles thru about 319 records. So it'll take a second or two to process. At least, it has with me. I've trimmed some code out of my example here. Namely, an entire column. But you get the idea of what I'm wanting it to, I hope.

Is it something simple? Got things in the wrong order or something? It seems like it should work from here. The logic of it, anyway. But it's not doing what I want.

Any ideas?

Jer!
__________________
Jers-Web, Inc.
Ever seen 49,825 Alert Boxes on one page? I have!
MrJL is offline   Reply With Quote
Old 07-02-2002, 12:47 AM   PM User | #2
MrJL
New Coder

 
Join Date: Jun 2002
Location: Central Ohio
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
MrJL is an unknown quantity at this point
Great!

Thanks a bunch! :-)

Jer!
__________________
Jers-Web, Inc.
Ever seen 49,825 Alert Boxes on one page? I have!
MrJL is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:36 PM.


Advertisement
Log in to turn off these ads.