Thanks for the responses.  I think what I'm looking for is explained
in the link from AD7six.  And I think I've almost got it working based
on reading it.  I think that the pagination setup that I'm using might
be breaking it.  The SQL output I get is when I set debug to 2:

7

SELECT COUNT(*) AS count FROM `stories` AS `Story` LEFT JOIN
`categories` AS `Category` ON `Story`.`category_id` = `Category`.`id`
LEFT JOIN `types` AS `Type` ON `Story`.`type_id` = `Type`.`id` LEFT
JOIN `approvals` AS `Approval` ON `Story`.`approval` = `Approval`.`id`
LEFT JOIN `audiences_stories` AS `AudiencesStory` ON
`AudiencesStory`.`story_id` = `Story`.`id` WHERE
`AudiencesStory`.`audience_id` <> 48

Affected: 1
Num Rows: 1
Took:  11ms

8

SELECT `Story`.`id`, `Story`.`category_id`, `Story`.`headline`,
`Story`.`type_id`, `Story`.`storyIntro`, `Story`.`storyFull`,
`Story`.`topStory`, `Story`.`author`, `Story`.`submittedBy`,
`Story`.`imageSmall`, `Story`.`imageMedium`, `Story`.`imageLarge`,
`Story`.`imageDescription`, `Story`.`dateSend`, `Story`.`dateActive`,
`Story`.`dateInactive`, `Story`.`urgent`, `Story`.`approval`,
`Story`.`priority`, `Category`.`id`, `Category`.`category_name`,
`Category`.`parent`, `Category`.`category_top`, `Type`.`id`,
`Type`.`type`, `Approval`.`id`, `Approval`.`approval` FROM `stories`
AS `Story` LEFT JOIN `categories` AS `Category` ON
`Story`.`category_id` = `Category`.`id` LEFT JOIN `types` AS `Type` ON
`Story`.`type_id` = `Type`.`id` LEFT JOIN `approvals` AS `Approval` ON
`Story`.`approval` = `Approval`.`id` WHERE
`AudiencesStory`.`audience_id` <> 48 ORDER BY `Story`.`id` ASC LIMIT
10

Error: 1054: Unknown column 'AudiencesStory.audience_id' in 'where
clause'   0

Thanks again for the help.  You guys are fantastic.

miggs


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to