SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist
    Join Date
    Jul 2005
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    using multiple recordsets?

    hi all,
    im building a site for a clinic. they want to have a calendar which displays the times for each day that are available for appointments.
    at the moment i have a calendar on my page. i want to display the correct times for each day. should i use one big recordset that gets all the times/dates from the db or cycle through each day and create a recordset for each day that there are times available (some days the clinic wont be open)?
    if i go with the latter option, i could potentially have 30 recordsets open. is there a fast way to execute recordsets. ive heard someone talk about the getRows method.
    cheers

  2. #2
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,609
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    My suggestion? Use one recordset/query, construct the SQL so that you GROUP BY the date/day, then use GetRows() to put the results into a local array so you can close and kill the DB connection and recordset.
    Ian Anderson
    www.siteguru.co.uk


Bookmarks

Posting Permissions

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