I couldn't think of a title, so i hope you all understand this.
using mssql db
i have the following variables.
current_log = time of the current login
last_log = time of last visit to site
last_view = time of the last view of a post
last_idate = time of last post
now in theory, if the last_view < last_idate then
rs1 = 1
and yes, i have a log of every post that everyone has read
now what I have, is a code that says if rs1 = 1 then show * (meaning there
is a new post)
if not, then don't show it.
the problem is, the * always shows
even if i change < to >
any ideas here

Signature
Thanks,
Bam
Evertjan. - 16 Feb 2008 09:17 GMT
Bam wrote on 16 feb 2008 in microsoft.public.inetserver.asp.db:
> I couldn't think of a title, so i hope you all understand this.
>
[quoted text clipped - 19 lines]
> the problem is, the * always shows
> even if i change < to >
Your hope is in vain, I don't, what is <to> ?
Perhaps show a minimal working example, Bam?

Signature
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Bam - 16 Feb 2008 15:18 GMT
news:Xns9A4668AEFD949eejj99@194.109.133.242...
> Bam wrote on 16 feb 2008 in microsoft.public.inetserver.asp.db:
>
[quoted text clipped - 25 lines]
>
> Perhaps show a minimal working example, Bam?
i see your point.
i meant change last_view < last_idate to last_view > last_idate
let me throw together a sample for you.
thanks
Bam - 16 Feb 2008 15:32 GMT
> news:Xns9A4668AEFD949eejj99@194.109.133.242...
>> Bam wrote on 16 feb 2008 in microsoft.public.inetserver.asp.db:
[quoted text clipped - 33 lines]
> let me throw together a sample for you.
> thanks
sortof of hard to show it working, because only admins can view this. And
the admin has to be logged to use as the last_idate function. so let me
think of a workaround here
McKirahan - 16 Feb 2008 14:47 GMT
> I couldn't think of a title, so i hope you all understand this.
>
[quoted text clipped - 21 lines]
>
> any ideas here
Insert:
Response.Write "<li>" & last_view & " : " & last_idate
before the test; what is displayed?
Are "last_view" and "last_idate" declared as Date data types?
Do you initialize rs1?
Bam - 16 Feb 2008 15:24 GMT
>> I couldn't think of a title, so i hope you all understand this.
>>
[quoted text clipped - 26 lines]
> Response.Write "<li>" & last_view & " : " & last_idate
> before the test; what is displayed?
a.. 2/13/2008 7:54:28 PM : 2/4/2008 12:13:50 PM
> Are "last_view" and "last_idate" declared as Date data types?
yes, they are date types in the mssql db
> Do you initialize rs1?
yes with this statement
<tr>
<td width="320">
<p align="center"><b>
<a href="admin_problem3.asp?pid=<%=var2%>">
<font color="#<%=rowcolor%>">
<span style="text-decoration:
none"><%=var1%></span></font></a></b></td>
<td width="53">
<p align="center"><font size="5"><% if rs1 = 1 then %>*
<% else %>
<% end if %>
</font></td>
</tr>
McKirahan - 16 Feb 2008 16:24 GMT
> >> I couldn't think of a title, so i hope you all understand this.
> >>
[quoted text clipped - 50 lines]
> </font></td>
> </tr>
How does the above initialize rs1? The only reference to it is:
<% if rs1 = 1 then %>
Perhaps your "rs1" variable is still "1" from somewhere ...
Your use of "rs1 = 2" suggest that this was the case.
Jon Paal [MSMD] - 16 Feb 2008 15:38 GMT
"rs1" is not a valid reference to a db value returned from a recordset.
did you mean "rs(1)" ?
Bam - 16 Feb 2008 15:43 GMT
> "rs1" is not a valid reference to a db value returned from a recordset.
>
> did you mean "rs(1)" ?
rs1 is basically a ficticous variable. could have been anything.
but i got it to work by doing this
if last_2 > last_ then
rs1 = 2
else
rs1 = 1
end if
for some reason, this is making it work. the rs1 = 2 means nothing, and does
nothing, but when i put thatinto the equation, it works.
thanks for the help guys. you all rock!!