Re: newbie: how to return one iteration *per unique date (DAY!)* in a timestamp column?
| From: | Govinda | Date: | Mon, 03 Aug 2009 14:34:10 +0000 |
| Subject: | Re: newbie: how to return one iteration *per unique date (DAY!)* in a timestamp column? | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-46389@lists.php.net to get a copy of this message | ||
Bastien,
I had tried it with the parantheses around the date for the distinct. I tried again just now. Same result. But that's ok. I am onto the next step now.
Niel, Jack,
I got your fix working. It shows me that I am still so new; I own yet so little mastery of MySQL.
Nisse, I see what you are suggesting. It seems I can go that route too. I have much to learn in every direction, so for right now anyway I am thinking to pursue the stream of thought started with what Niel and Jack just gave me.
I do need data from the other columns too, and not just the date extracted from that timestamp field, ...and I need to count # of records in other tables that have the same unique date as the list of unique dates I just found in my first table, etc.
.. 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 need to play with everything before asking for more detailed help; I am just now asking if you think I am on the right track with my thinking - as I just mentioned in the sentence above this one?
Thanks everyone!
-Govinda