I should have given an example ..
select count(*) as record_count, date(column_name) as date_field,
'my_table' as table_name
union all
select count(*) as record_count, date(column_name) as date_field,
'my_table_2' as table_name
and end up with:
count | date | table_name
-
Chris wrote:
Ben Dunlap wrote:
> ...which will echo:
"#records in 't7solar_landing' matching the given (iterating)
date (in the 'solarLandingDateTime' column)#records in
'aw_7solar_confirm' matching the given (iterating) date (in the
'solarAwConfDateTime' column)#records in 'aw_7solar_aw'
ma
Ben Dunlap wrote:
> ...which will echo:
"#records in 't7solar_landing' matching the given (iterating)
date (in the 'solarLandingDateTime' column)#records in
'aw_7solar_confirm' matching the given (iterating) date (in the
'solarAwConfDateTime' column)#records in 'aw_7solar_aw'
matching the giv
> ...which will echo:
> "#records in 't7solar_landing' matching the given (iterating)
> date (in the 'solarLandingDateTime' column)#records in
> 'aw_7solar_confirm' matching the given (iterating) date (in the
> 'solarAwConfDateTime' column)#records in 'aw_7solar_aw'
> matching the given (iterati
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
.. 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 examp
Just keep in mind that while that may be a very possible solution when
datasets are small. This could get problematic when for instance there are a
10 years worth of dates and millions of records in the other tables. The
resulting program could end up taking lots of time to display data. In your
ca
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 iterat
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
On Aug 3, 2009, at 12:29 AM, Govinda
wrote:
Oops, forgot to mention that with the alias you can change the
ORDER BY
clause to use the aliased column data:
ORDER BY solarLandingDate DESC
this will only use the returned data instead of the entire column.
If you are aliasing a column it
On Mon, 3 Aug 2009 11:52:11 +0200, Nisse Engström wrote:
> You could use the date as an index:
>
> ... SELECT DATE(`datetimecolumn`) AS `date` ...
>
> while ($TrackingRow = mysql_fetch_object (...)) {
> $data[$TrackingRow['date']] = $TrackingRow;
> /* Store the last row from each set
On Sun, 2 Aug 2009 16:30:35 -0600, Govinda wrote:
> I'm translating some code from another server-side language into PHP,
> and I need something that 'summarizes' results found from a MySQL
> SELECT. I.e. -
>
> $foundTrackingRows=mysql_query("SELECT...
> while ($TrackingRow = mysql_fetch_obj
12 matches
Mail list logo