function selecthighschool()
        {
                $conditions = array("Listing.school_high" => "<> ''");
                return $this->Listing->generateList($conditions, 'school_high 
ASC',
null, '{n}.Listing.school_high', '{n}.Listing.school_high');
        }

The code above should return a list of distinct high schools (for use
in a selectTag) where school_high <> ''.  In other words, not an empty
string.  However, the $conditions are not being set using this method.
Here is the query being generated that I see with debug=2:

SELECT `Listing`.`list_id`, `Listing`.`comp_code`, `Listing`.`price`,
`Listing`.`mls`, `Listing`.`area`, `Listing`.`address`,
`Listing`.`addressnumber`, `Listing`.`addressdir`,
`Listing`.`addressstreet`, `Listing`.`city`, `Listing`.`state`,
`Listing`.`zip`, `Listing`.`bedrooms`, `Listing`.`baths`,
`Listing`.`halfbath`, `Listing`.`garages`, `Listing`.`fireplace`,
`Listing`.`liveroom`, `Listing`.`family`, `Listing`.`game`,
`Listing`.`kitchen`, `Listing`.`eating`, `Listing`.`formaldine`,
`Listing`.`office`, `Listing`.`basement`, `Listing`.`masterbed`,
`Listing`.`bedroom_2`, `Listing`.`bedroom_3`, `Listing`.`bedroom_4`,
`Listing`.`bedroom_5`, `Listing`.`tax`, `Listing`.`agent`,
`Listing`.`listoffice`, `Listing`.`sqft`, `Listing`.`built`,
`Listing`.`school_elementary`, `Listing`.`school_junior`,
`Listing`.`school_high`, `Listing`.`sqft_price`, `Listing`.`lotsize`,
`Listing`.`assdues`, `Listing`.`class`, `Listing`.`type`,
`Listing`.`statuscatid`, `Listing`.`thumburl` FROM `listings` AS
`Listing` WHERE (`Listing`.`school_high` <> '\'\'') ORDER BY
`school_high` ASC

How do I do this?


--~--~---------~--~----~------------~-------~--~----~
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