---
title: "if sats"
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/95704-if-sats"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "Gimbo"
published: "2004-01-25T15:36:33.000Z"
updated: "2004-01-25T15:45:49.000Z"
replies: 2
views: 114
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/asp/95704-if-sats"
---

# if sats

## #1 — Gimbo, 2004-01-25T15:36Z

hejsan,

har denna enkla if sats men den fungerar inte, den skriver ut den första bilden dvs om pVisits är mindre än 20 samt om pVisits är större än 20, den skriver inte ut intervallerna där efter.

```
   response.write "<b>poppis:</b> "&pVisits&" " 
   if pVisits > "0" AND pVisits < "20" then 
   response.write "<img src=""img/0popular.gif""><br>"
   elseif pVisits > "21" AND pVisits < "40" then
   response.write "<img src=""img/1popular.gif""><br>"
   elseif pVisits > "41" AND pVisits < "60" then
   response.write "<img src=""img/2popular.gif""><br>"
   elseif pVisits > "61" AND pVisits < "80" then
   response.write "<img src=""img/3popular.gif""><br>"
   elseif pVisits > "81" then
   response.write "<img src=""img/4popular.gif""><br>"   
   else 
   respone.write "nothin found"
   end if
```

Permalänk: https://www.webforum.nu/p/95704

## #2 — solbulle, 2004-01-25T15:43Z

Om pVisits innehåller ett tal ska du inte ha apostrofer runt talen du jämför med.

PS.

**nothing**

Permalänk: https://www.webforum.nu/p/1260763

## #3 — Gimbo, 2004-01-25T15:45Z

tackar solbulle, att man kan göra såna grundläggande fel

Permalänk: https://www.webforum.nu/p/1260764

---

Tråden på webben: https://www.webforum.nu/amne/asp/95704-if-sats
