Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





  Last Thread  Next Thread
Author
Thread Post New Thread   

ASP VBScript If Else
 

Matt - Stamats




quote this post edit post

IP Loged report this post

Old Post  09-30-04 - 12:16 AM  
So I have a page that I am working on and I am hainv a problem with a certai
n
db. record. I have a field called "cancertypes" In this field there are list
s
of cancer type IE

breast, gallbladder, bladder, kidney, prostate,liver

So in order to get certain values I had to make the SQL statement

SELECT *
FROM types
WHERE cancertype  LIKE '%MMColParam%'
ORDER BY sortOrder ASC, Name ASC

So I am getting some of the values from cancertypes gallbladder and bladder
showing put on the same results pages. So I want to make a VBSCRIPT if else
statements. I changed the value Gallbladder to Gall then I want to make a if
else the says if "cancer type = "gall" response.write "bladder" and add it t
hat
way. Here is the code below. Is this a good fix or does anyone know of anyth
ing
better to use?

Thanks
-Matt

<%=(Recordset1.Fields.Item("cancertype").Value)%><%
If (Recordset1.Fields.Item("cancertype").Value) = "Gall" Then
Response.Write "blader"
End If
%>



Post Follow-Up to this message ]
Re: ASP VBScript If Else
 

Paul Whitham TMM




quote this post edit post

IP Loged report this post

Old Post  09-30-04 - 12:17 AM  
What you have done will work, however you are going to create a lot of
coding work if you abbreviate other names. If you are shortening the name to
help with input why not create a separate table to hold the names and then
link that to a drop down box on the input page.

--
Regards

Paul Whitham
Macromedia Certified Professional for Dreamweaver MX2004
Valleybiz Internet Design
www.valleybiz.net

Team Macromedia Volunteer for Ultradev/Dreamweaver MX
www.macromedia.com/support/forums/team_macromedia

"Matt - Stamats" <webforumsuser@macromedia.com> wrote in message
news:cjes57$68$1@forums.macromedia.com...
> So I have a page that I am working on and I am hainv a problem with a
certain
> db. record. I have a field called "cancertypes" In this field there are
lists
> of cancer type IE
>
>  breast, gallbladder, bladder, kidney, prostate,liver
>
>  So in order to get certain values I had to make the SQL statement
>
>  SELECT *
>  FROM types
>  WHERE cancertype  LIKE '%MMColParam%'
>  ORDER BY sortOrder ASC, Name ASC
>
>  So I am getting some of the values from cancertypes gallbladder and
bladder
> showing put on the same results pages. So I want to make a VBSCRIPT if
else
> statements. I changed the value Gallbladder to Gall then I want to make a
if
> else the says if "cancer type = "gall" response.write "bladder" and add it
that
> way. Here is the code below. Is this a good fix or does anyone know of
anything
> better to use?
>
>  Thanks
>  -Matt
>
>  <%=(Recordset1.Fields.Item("cancertype").Value)%><%
>  If (Recordset1.Fields.Item("cancertype").Value) = "Gall" Then
>  Response.Write "blader"
>      End If
>  %>
>




Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 06:23 PM. Post New Thread   
  Previous Last Thread   Next Thread next
Dreamweaver archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top