<% songID = request("songID") Set Conn=Server.CreateObject("ADODB.Connection") dbname="CbaoSongAlbum0748.mdb" dbpath="DBQ=" & server.mappath(dbname) Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & dbpath if request("songNumber") <> "" then sql = "SELECT TOP 1 AlbumCbao.AlbumRelease, AlbumCbao.AlbumNumber, AlbumCbao.AlbumName, AlbumCbao.AlbumContent, AlbumCbao.AlbumOther, AlbumCbao.AlbumPicture, SongCbao.* FROM AlbumCbao INNER JOIN SongCbao ON AlbumCbao.AlbumNumber = SongCbao.AlbumNumber WHERE SongCbao.AlbumNumber = " & request("AlbumNumber") & " Order By SongCbao.SongNumber " else sql = "SELECT AlbumCbao.AlbumRelease, AlbumCbao.AlbumNumber, AlbumCbao.AlbumName, AlbumCbao.AlbumContent, AlbumCbao.AlbumOther, AlbumCbao.AlbumPicture, SongCbao.* FROM AlbumCbao INNER JOIN SongCbao ON AlbumCbao.AlbumNumber = SongCbao.AlbumNumber WHERE SongCbao.ID = " & songID & " " end if set rs = Conn.execute(sql) If rs.eof Then Response.Write("ยังไม่มีเพลงนี้") Else AlbumNumber = rs("AlbumNumber") While not rs.eof %> <% rs.MoveNext Wend End If RS.Close Conn.Close %>

" width="144" height="144">
  <%=rs("AlbumName")%>
<%'=int(right(rs("AlbumRelease"),2))%>  <%=MonthName(mid(rs("AlbumRelease"),6,2))%> <%=left(rs("AlbumRelease"),4)%>


<%sql = "SELECT ID, SongNumber, SongName FROM SongCbao WHERE AlbumNumber = " & AlbumNumber & " Order By SongNumber" set rs1 = Conn.execute(sql)%> <%Do while not rs1.eof%>         "><%=rs1("SongNumber")%>. <%=rs1("SongName")%>
<% rs1.MoveNext Loop RS1.Close %>
 
เลือกประเภทอัลบั้ม :

 
อรัมภบท : <%=rs("AlbumContent")%>
<%=rs("AlbumOther")%>
 
ชื่อเพลง : <%=rs("SongName")%>
คำร้อง : <%=rs("SongAuthor")%>
ทำนอง : <%=rs("SongManner")%>

<%=rs("SongDetails")%>