Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2005
    Posts
    18

    Question Unanswered: Inserting query Responses into a form table

    Hi guyz i wanted to ask if anyone knows how to insert data from a query into a table in a form. I am using ASP and mysql for the db.

    I havn't a clue how to start tackling this one. Do i need to create a table first hand or can i run a script which creates the table as it displays the query... so that the script creates the numbers of rows in the form tabel to match the number of rows returned by the query? I want to return the top 3 rows from my table using the nearest date and display these.

    I'd be greatful for any pointers or links where this process is explained. Thanks alot.

  2. #2
    Join Date
    Nov 2004
    Posts
    285
    Provided Answers: 1
    Am I correct in asuming you want to display the results from a query in a table in asp?? The resultset is what you want displayed?

  3. #3
    Join Date
    Jan 2005
    Posts
    18

    display query results

    Yes thats right, i want to display the query results. Sorry if i didnt make any sense.

  4. #4
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032
    Perhaps check this out:

    Database GetRows
    http://www.asp101.com/samples/db_getrows.asp

    And perhaps check out the other database samples at www.asp101.com/samples
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

  5. #5
    Join Date
    Nov 2004
    Posts
    285
    Provided Answers: 1
    This is perhaps not the best solution but works for me:

    Code:
    <table>
    <%
    While not recordset.eof
      response.write "<tr><td>" & recordset("fieldname") & "<\td><\tr>"
      recordset.movenext
    Wend
    %>
    </table>
    Very basic example, but should give you an idea.

Posting Permissions

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