<%
ConnString = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=luther.ebiz4.com; DATABASE=heart-t_robhs; " &_
"UID=heart-t_robhs;PASSWORD=balaji; OPTION=3"
Set Connection = Server.CreateObject("ADODB.Connection")
Set Recordset = Server.CreateObject("ADODB.Recordset")
Connection.Open ConnString
SQL = "SELECT * FROM events_news"
if request.QueryString("type") = 1 then
SQL=SQL&" where current_date between sdate and edate and type='events'"
response.write("")
elseif request.QueryString("type") = 2 then
response.write("")
else
SQ="select count(*) from events_news"
Recordset.Open SQ,Connection
s=Recordset.GetRows(1,0)
k=cInt(s(0,0))
Recordset.Close
Set Recordset=nothing
Connection.Close
Set Connection=nothing
n=request.QueryString("n")
Set Connection = Server.CreateObject("ADODB.Connection")
Set Recordset = Server.CreateObject("ADODB.Recordset")
SQL=SQL&" LIMIT "&n&",5"
Connection.Open ConnString
Recordset.Open SQL,Connection
Response.write("Events-News list ")
If Recordset.EOF Then
Response.Write("***Heart Throbs*** Powerd By Softwings Team")
Else
Do While NOT Recordset.Eof
response.write("")
Response.write Recordset("name")
Response.write "
"
Recordset.MoveNext
Loop
End If
if n = 0 then
response.write "Next>"
elseif n <> 0 And n+5<previous|Next>"
else
response.write "<previous"
end if
end if
Recordset.Close
Set Recordset=nothing
Connection.Close
Set Connection=nothing
%>