We've had so many posts on the forum that we've summarised what's been uploaded to date to make it easier to read. To catch up with what's been happening and respond to our latest thinking, click on a topic below. Thanks very much for all of your contributions, they've really pushed our thinking along. We'll be pushing the group discussion into the next stage shortly, so check back soon.
<%
strConnString = "driver={SQL Server};server=sql7.globalgold.co.uk;uid=betterthinking;pwd=master-point;database=betterthinking"
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
strSql = "SELECT * from forum_topics where binary_display=1 order by datetime_date desc"
set rs = my_Conn.Execute (strSql)
%>
<%
Do Until rs.eof
id_forum_topic = rs("idforum_topic")
title_graphic_root = rs("title_graphic_root")
title_graphic_main = rs("title_graphic_main")
topic_summary = rs("topic_summary")
topic_brief = rs("topic_brief")
binary_display = rs("binary_display")
strSql = "SELECT * from forum_posts where binary_display=1 and id_forum_topics=" & id_forum_topic & " order by datetime_date desc"
'response.write(strsql)
set rs_posts = my_Conn.Execute (strsql)
no_of_posts = 0
Do Until rs_posts.eof
no_of_posts = rs_posts.RecordCount
id_forum_posts = rs_posts("idforumposts")
varchar_post = rs_posts("varchar_post")
varchar_subject = rs_posts("varchar_subject")
datetime_date = rs_posts("datetime_date")
no_of_posts=no_of_posts+1
rs_posts.movenext
Loop
no_of_weeks = -DateDiff("w",now,datetime_date)
no_of_days = -DateDiff("d",now,datetime_date)
no_of_hours = -DateDiff("h",now,datetime_date)
no_of_minutes = -DateDiff("n",now,datetime_date)+9
'response.write("datetime_date:" & datetime_date & ",
date:" & now)
'response.write("w:" & no_of_weeks & ",
d:" & no_of_days & ",
h:" & no_of_hours & ",
m:" & no_of_minutes &"
")
If no_of_posts > 0 Then
If no_of_weeks>0 Then
If no_of_weeks > 1 then
last_comment_time = no_of_weeks & " weeks ago"
Else
last_comment_time = no_of_weeks & " week ago"
End if
Else
If no_of_days>0 Then
If no_of_days > 1 then
last_comment_time = no_of_days & " days ago"
Else
last_comment_time = no_of_days & " day ago"
End if
Else
If no_of_hours>0 Then
If no_of_hours > 1 then
last_comment_time = no_of_hours & " hours ago"
Else
last_comment_time = no_of_hours & " hour ago"
End if
Else
If no_of_minutes>0 Then
If no_of_minutes > 1 then
last_comment_time = no_of_minutes & " minutes ago"
Else
last_comment_time = no_of_minutes & " minute ago"
End if
End if
End if
End if
End If
Else
last_comment_time = "no posts"
End if
%>
<%
rs.movenext
loop
%>