> I'm running into a few issues with 2 HABTM associations. I'm working
> on a events listing app (bit like upcoming.org but more specific) and
> I have a tagging system in place. I have the following tables:
>
> events
> tags
> events_tags
>
> I want to be able to list events by date, and also only show events
> that come after the current date, basiucally doing:
>
> Event.event_start > now()
>
no worries, got it sorted:
'SELECT Tag.id, Tag.name, Tag.handle, Tag.description, Tag.tag_count,
Tag.created, Tag.modified, Event.event_start FROM events AS Event,
tags AS Tag JOIN events_tags ON events_tags.event_id = {$__cakeID__$}
AND events_tags.tag_id = Tag.id WHERE Event.event_start > now()'
think I'm starting to realise my SQL needs some work ;)
jb
--
jon bennett
t: +44 (0) 1225 341 039 w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---