Display records

Results 1 to 3 of 3

Thread: Display records

  1. #1
    Laththa Guest

    Default Display records

    there is two table: Author Details and Books<BR>one book has many authors and i want to list them all in asp by comma.<BR><BR>I can only get one authors name with the code below:<BR>****************************Begining of code******************<BR>&#060;%<BR><BR>SQL_Query = "SELECT * "<BR>SQL_Query = SQL_Query & "FROM Books, `Author Details`, Authors "<BR>SQL_Query = SQL_Query & "WHERE (`Author Details`.AuthorID = Authors.AuthorID AND "<BR>SQL_Query = SQL_Query & "`Author Details`.Title = Books.Title AND "<BR>SQL_Query = SQL_Query & "Books.Title=&#039" & strText&"&#039)"<BR><BR><BR> <BR> Set MyConn = Server.CreateObject("ADODB.Connection")<BR> Set RS = Server.CreateObject("ADODB.RecordSet")<BR> MyConn.Open "DSN=cnnCatalogue"<BR> RS.Open SQL_query, MyConn, 1<BR>%&#062;<BR> &#060;p&#062;&#060;%=Response.Write(RS("AuthorsNam e"))%&#062;&#060;/p&#062;<BR> <BR>&#060;%<BR>RS.Close <BR>Set RS = nothing<BR>MyConn.Close<BR>Set MyConn = Nothing<BR>****************************End of code******************<BR>

  2. #2
    Saravanan T S Guest

    Default RE: Display records

    Hi,<BR> Can u explain the problem in details? And in the from string u mentioned three tables? But u told u have two tables only. clarify it. <BR><BR>Saravanan.

  3. #3
    Laththa Guest

    Default RE: Display records

    Hi<BR><BR>My author table has author ID, author name and author description. Author details table has author id and title. While my book table holds book info such as title, isbn, editor.<BR><BR>I&#039m trying to list all authors for a title and i&#039m lost.<BR><BR>Thanks.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts