navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

What if on db-query

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> What if on db-query
Page: [1]
 
Matth

 

Posts: 36
From: Zurich, Switzerland
Status: offline

 
What if on db-query - 5/10/2001 20:12:00   
Hi there

I have a problem with an asp-page that I use to display some records. Based on the fields, I want to display two different messages, but for some reason this does not work. I have two records, on with a date of 5/10/01, the other with date 5/17/01.

For the one with date 5/10 I want to display a hyperlink, for the second I just want a message shown, and have that changed on that date.

But the following code shows the hyperlink for both records. What's wrong?


<!--#include file="_fpclass/fpdbrgn1.inc"-->
<% if (FP_FieldVal(fp_rs,"pdate")) <= date() then %>
<%=FP_FieldVal(fp_rs,"Set_Name")%>
<% else %>
<a href="members/story.asp?index=<%=FP_FieldVal(fp_rs,"Id")%>">
<%=FP_FieldVal(fp_rs,"Set_Name")%>
</a>
<% end if %>
<!--#include file="_fpclass/fpdbrgn2.inc"-->

Any help highly appreciated.

Matthias

Spooky

 

Posts: 26599
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: What if on db-query - 5/11/2001 20:10:00   
Try this one :

<% if cDate(FP_FieldVal(fp_rs,"pdate")) <= date() then %>

That should let it know its a date its checking. Are they all valid date format entries?

------------------
§þððk¥
"I am Spooky of Borg. Prepare to be assimilated, babycakes!"
Subscribe to OutFront News
Database / DRW Q & A
The Spooky Login!


(in reply to Matth)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> What if on db-query
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts