problemer med select (tror jeg nok)
Haj alle sammen. Jeg skal have vist de nyeste emner i fora på min side www.b-teens.dkMen den vil ikke udskrive dem og jeg mistænker select sætningen for det. Jeg har for nyligt konventeret min db fra access til mysql hvis det skulle have indflydelse....
jeg vedlægger lige kodestumpen som den er gal med....
---------------------------------------------------------
response.write("<tr>")
response.write("<td height='1' colspan='2' background='gfx/gif/dot.gif'></td>")
response.write("</tr>")
response.write("</table>")
response.write("<br><br>")
SQL = "SELECT foratopics.id, fora, topic, DATE_FORMAT(foratopics.addeddate,'%d/%m') as datestr, locked FROM foratopics, foras WHERE foras.id = foratopics.fora ORDER BY foratopics.id DESC limit 1,0;"
set RS = conn.execute(SQL)
response.write("<table width='153' border='0' align='center' cellpadding='2' cellspacing='0'>")
response.write("<tr>")
response.write("<td width='20' valign='middle'><strong><img src='gfx/gif/icons/forum_over.gif' width='13' height='14'>")
response.write("</strong></td>")
response.write("<td width='148' valign='middle'><strong>Forum</strong></td>")
response.write("</tr>")
response.write("<tr>")
response.write("<td height='1' colspan='2' background='gfx/gif/dot.gif'></td>")
response.write("</tr>")
if RS.EOF then
response.write("<tr>")
response.write("<td colspan='2' height='25'>")
response.write("<font color='#999999'>Ingen fundet</font>")
response.write("</td>")
response.write("</tr>")
end if
do while not RS.EOF
datestr = replace(RS("datestr"),"-","/")
topicstr = left(RS("topic"),15) & "..."
if not session("login") = 1 and RS("locked") <> 2 then
response.write("<tr>")
response.write("<td colspan='2' valign='middle'>" & datestr & ": ")
if session("login") = "1" OR RS("locked") = 0 AND not RS("locked") = 2 then
response.write("<a href='?page=6&mode=replys&fora=" & RS("fora") & "&topic=" & RS("id") & "'>" & topicstr & "</a>")
elseif session("login") = "" AND RS("locked") = 1 then
response.write(topicstr)
end if
response.write("</td>")
response.write("</tr>")
end if
RS.movenext
loop
response.write("<tr>")
response.write("<td height='1' colspan='2' background='gfx/gif/dot.gif'></td>")
response.write("</tr>")
response.write("</table>")