Govinda wrote: > .. so my thought is to want to do nested query(ies), where: > *within* the while loop of the first recordset (which is now > successfully returning just rows with unique dates), I do other > query(ies) which will (in their own code block) find all rows of the > date we are iterating.. so I can, for example, count number of records > for each unique date, do math/statistics, etc. I had to do something similar in code of my own a little while ago, and got some very good guidance on Stack Overflow. Here's the thread, you might find it helpful: http://stackoverflow.com/questions/946214/one-sql-query-or-many-in-a-loop The user whose answer is marked as the correct one ("Quassnoi") also writes a helpful blog on SQL. You should be able to find the blog by clicking on the username. Ben -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php