Okay - see below. No returned array because of the MySQL errors.
Thanks for your time.

                $this->paginate['CourseResult'] = array(
                        'contain' => array(
                                'Course' => array(
                                        'CourseLanguage',
                                        'CourseType',
                                        'CourseLevelMin',
                                        'CourseLevelMax',
                                        'School',
                                        'CourseQualification'
                                )
                        ),
                        'conditions' => $conditions
                );

$conditions = array
(
    [Course.course_type_id] => 1
    [School.city] => London
    [School.country_id] => 225
    [0] => Array
        (
            [or] => Array
                (
                    [CourseLevelMin.order <=] => 1
                    [Course.course_level_min] =>
                )

        )

    [1] => Array
        (
        )

    [2] => Array
        (
            [Course.published] => 1
        )

    [3] => Array
        (
            [Course.deleted] => 0
        )

)


SELECT COUNT(*) AS `count` FROM `course_results` AS `CourseResult`
LEFT JOIN `courses` AS `Course` ON (`CourseResult`.`course_id` =
`Course`.`id`) WHERE `Course`.`course_type_id` = 1 AND `School`.`city`
= 'London' AND `School`.`country_id` = '225' AND
((`CourseLevelMin`.`order` <= '1') OR (`Course`.`course_level_min` IS
NULL)) AND `Course`.`published` = 1 AND `Course`.`deleted` = 0

Error: 1054: Unknown column 'School.city' in 'where clause'

SELECT `CourseResult`.`id`, `CourseResult`.`course_id`,
`CourseResult`.`no_of_weeks`, `CourseResult`.`year`,
`CourseResult`.`price`, `Course`.`id`, `Course`.`name`,
`Course`.`school_id`, `Course`.`course_type_id`,
`Course`.`course_level_min`, `Course`.`course_level_max`,
`Course`.`course_language_id`, `Course`.`start_time`,
`Course`.`starts_every_monday`, `Course`.`start_date`,
`Course`.`fixed_start_date`, `Course`.`our_ref`,
`Course`.`school_ref`, `Course`.`lessons_per_week`,
`Course`.`lesson_duration`, `Course`.`course_materials_included`,
`Course`.`course_materials_fee`, `Course`.`commission`,
`Course`.`discount`, `Course`.`booking_fee`,
`Course`.`our_booking_fee`, `Course`.`minimum_age`,
`Course`.`maximum_age`, `Course`.`max_class_size`,
`Course`.`course_qualification_id`,
`Course`.`course_qualification_fee`, `Course`.`published`,
`Course`.`flagged`, `Course`.`deleted`, `Course`.`deleted_date`,
`Course`.`accommodation_id`, `Course`.`lead_in_price` FROM
`course_results` AS `CourseResult` LEFT JOIN `courses` AS `Course` ON
(`CourseResult`.`course_id` = `Course`.`id`) WHERE
`Course`.`course_type_id` = 1 AND `School`.`city` = 'London' AND
`School`.`country_id` = '225' AND ((`CourseLevelMin`.`order` <= '1')
OR (`Course`.`course_level_min` IS NULL)) AND `Course`.`published` = 1
AND `Course`.`deleted` = 0 LIMIT 20

Error: 1054: Unknown column 'School.city' in 'where clause'

On Sep 4, 1:41 am, Miles J <[email protected]> wrote:
> What does the returned array look like, and may I also see the SQL?
>
> Additionally, please check that the rows exist that should be linked
> to it.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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