|
| » Resources » Market Commentary |
| |
Resources » Market Commentary
|
|
|
<%
set dbconn=getDB()
'Latest Comments
Set rslat=Server.CreateObject("ADODB.Recordset")
rslat.cursortype=3
strSqllat="select *, DATEPART(dw, entrydate) as weak_day from market_comments where delstatus=0 and readstatus=1 and convert(varchar(10),entrydate,101)=(select top 1 convert(varchar(10),entrydate,101) from market_comments order by entrydate desc) order by entrydate desc"
rslat.Open strSqllat,dbconn
'Archives
Set rs=Server.CreateObject("ADODB.Recordset")
rs.cursortype=3
strSql=" select top 10 *, DATEPART(dw, entrydate) as weak_day from market_comments where delstatus=0 and readstatus=1 and convert(varchar(10),entrydate,101)<>(select top 1 convert(varchar(10),entrydate,101) from market_comments order by entrydate desc) order by entrydate desc"
rs.Open strSql,dbconn
'Top value
Set rstop=Server.CreateObject("ADODB.Recordset")
rstop.cursortype=3
strSqltop="select top 1 cno,entrydate from market_comments where readstatus=1 and delstatus=0 order by entrydate desc"
rstop.Open strSqltop,dbconn
%>

 |
Latest Market Comments |
 |
 |
|
|
|
<%
if rslat.recordcount<>0 then
bgcol=1
while not rslat.eof
%>
|
|
|
<%if rslat("comments_by")<>"" then%>
|
<%end if%>
| ------------------------------ |
<%bgcol=bgcol+1
rslat.movenext
Wend
%>
<%
else
%>
| Market Commentry unavailable now |
<%end if%>
|
 |
 |
|
 |
<%if rs.recordcount<>0 then%>

 |
Market Commentary Archives |
 |
 |
| Recent |
<%
if rs.recordcount<>0 then
bgcol=1
while not rs.eof
%>
|
|
|
<%if rs("comments_by")<>"" then%>
|
<%end if%>
| ------------------------------ |
<%bgcol=bgcol+1
rs.movenext
Wend
%>
<%
else
%>
| Market Commentry unavailable now |
<%end if%>
|
 |
 |
|
 |
<%end if%>
|
|
|
| |