I’m trying to pick a different sql line when a querystring exists or not…heres the code:
if request.querystring("ID"
<> "" then
recordtoview = request.querystring("ID"
strsql = "SELECT * from news ORDER BY news.newsDate where news.newsid =" & recordtoview & ";" else
strsql = "SELECT * from news ORDER BY news.newsDate DESC"
end if
the first time you goto to page it should use the else part, since “id” doesn’t exist. If you click a different article it adds id to url and reloads page. Eventhou the url is right, it still shows the else part…
if request.querystring("ID"
recordtoview = request.querystring("ID"
strsql = "SELECT * from news ORDER BY news.newsDate where news.newsid =" & recordtoview & ";" else
strsql = "SELECT * from news ORDER BY news.newsDate DESC"
end if
the first time you goto to page it should use the else part, since “id” doesn’t exist. If you click a different article it adds id to url and reloads page. Eventhou the url is right, it still shows the else part…