日期:2014-05-17 浏览次数:20813 次
<% Dim RsReadNew Set RsReadNew = DB("[color=#0000FF]SELECT [id],[title],[content] FROM [table1],[table2] WHERE [userid]=5 AND [pass]=1 ORDER BY [xtime] DESC[/color]",2) If RsReadNew.Eof And RsReadNew.Bof Then response.write "暂无" Else Dim ReadNewN:ReadNewN = 0 Do While Not RsReadNew.Eof Response.Write "标题"&ReadNewN&":"&RsReadNew("title")&"<br>内容:"&RsReadNew("content") RsReadNew.movenext ReadNewN = ReadNewN + 1 If ReadNewN >= 8 Then Exit Do Loop End If RsReadNew.close:Set RsReadNew = Nothing %>
SELECT a.[id],a.[title],a.[content] FROM [table1] a,[table2] b WHERE a.userid = b.userid And a.[userid]=5 AND a.[pass]=1 ORDER BY a.[xtime] DESC