[thelist] Problem with SQL Query - using PHP and MySQL

Pringle, Ron RPringle at aurora-il.org
Tue Nov 14 09:32:21 CST 2006

Just to follow up, here is the statement I ended up with. Only tested it
directly, haven't done anything with the result set in PHP yet. Thanks
for the solution Phil!

title, MIN(eventDate) AS FirstDate,
GROUP_CONCAT(DATE_FORMAT(eventDate, '%c/%e')
ORDER BY eventDate Separator ', ')
AS EventDateString
FROM tbl_event
INNER JOIN tbl_eventDates
USING (eventID)
WHERE eventDate >= Current_Date
GROUP BY title
ORDER BY FirstDate;

I changed it slightly, but only just.

Thanks again!


-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org]On Behalf Of Pringle, Ron
Sent: Tuesday, November 14, 2006 8:44 AM
To: thelist at lists.evolt.org
Subject: Re: [thelist] Problem with SQL Query - using PHP and MySQL

Thanks Phil, Matt and Paul! I shall give your suggestions a try. Since,
ideally, I'd like to order the events by date (at least by first
occurance), I'll try Phil's suggestion first and work from there.


* * Please support the community that supports you.  * *

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 

More information about the thelist mailing list