Search results

  1. L

    Nested loops and SQL data

    MilesWeb - Thank you!! I had to tweak some counters because it wasn't resetting with each trainer. $CTOQuery = "SELECT * FROM Training WHERE (Date BETWEEN '" . $_REQUEST['StartDate'] . "' AND '" . $_REQUEST['EndDate'] . "') ORDER BY CTO"; $CTOResult = sqlsrv_query($conn, $CTOQuery, array()...
  2. L

    Nested loops and SQL data

    I understand what both replies are doing but that's not quite what I'm looking for. I have 4 trainers and let's say there 10 reports found from my query. Each report had fields that I want to get to total for each trainer. while the trainer equals this name, count these fields for that...
  3. L

    Nested loops and SQL data

    I have a question on how to perform a nested loop based on some SQL data. I have a SQL query in which I'm looking for some records within a date range and ordered by a 'Trainer' field. I want to take that data and perform a count of certain fields for each trainer and put them in a table. I...
Back
Top