What if on db-query (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


Matth -> 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 -> 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!





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
6.152344E-02