<% Set Rs = Server.CreateObject("ADODB.RecordSet") Rs.Open "SELECT TOP 4 * FROM board WHERE b_id = 21 ORDER BY board_idx DESC", Application("ConnectionString") If Rs.EOF or Rs.BOF Then %> <% Else p_count = 0 Do until Rs.EOF p_count = p_count + 1 shortTitle = Rs("title") If lenB(shortTitle) > 30 Then shortTitle = LeftB(shortTitle, 30) & "..." End if Rs.MoveNext Loop If p_count < 3 Then For p_count = p_count + 1 to 3 %> <% Next End if End if Rs.Close %>
no search.
 
 
 
<% Rs.Open "SELECT TOP 5 * FROM board WHERE b_id = 23 ORDER BY board_idx DESC", Application("ConnectionString") If Rs.EOF or Rs.BOF Then %> <% Else p_count = 0 Do until Rs.EOF p_count = p_count + 1 shortTitle = Rs("title") If lenB(shortTitle) > 30 Then shortTitle = LeftB(shortTitle, 30) & "..." End if %> <% Rs.MoveNext Loop If p_count < 5 Then For p_count = p_count + 1 to 5 %> <% Next End if End if %>