[symfony-users] Re: Nested query with propel

2009-09-21 Thread alessandro
the following query is passed to my function by a criteria: (SELECT * FROM locations LEFT JOIN locations_sezioni ON (locations.LOCATION_ID=LOCATIONS_SEZIONI_LOCATION_ID) where (locations_sezioni.LOCATIONS_SEZIONI_SEZIONE_ID<>4 AND locations_sezioni.LOCATIONS_SEZIONI_SEZIONE_ID<>5) AND locatio

[symfony-users] Re: Nested query with propel

2009-09-20 Thread Stig Manning
Hi Alessandro, There are a number of ways to do this. See http://snippets.symfony-project.org/snippet/75 Criteria::CUSTOM has worked well for me, but make sure to manually escape any variables used here with a mysql_real_escape_string($var,Propel::getConnection()). Cheers, Stig alessandro wr