Hi Jevon, So for some queries which use very specific functions, you might need to use some raw SQL:
http://www.symfony-project.com/book/trunk/08-Inside-the-Model- Layer#Using%20Raw%20SQL%20Queries And when you do so, make sure you do it something like: $connection = Propel::getConnection(); $query = 'DELETE %s,%s FROM %s Left JOIN %s ON %s=%s WHERE %s IS NULL'; $query = sprintf($query, TagPeer::TABLE_NAME, TagGluePeer::TABLE_NAME, TagPeer::TABLE_NAME, TagGluePeer::TABLE_NAME, TagGluePeer::TAG_ID, TagPeer::ID, TagGluePeer::TAG_ID); $statement = $connection->prepareStatement($query); $statement->executeQuery(); That will a) protect you from injection nastiness, and b) keep you in with Propel / Symfony logging, debugging etc. - Piers On 23/05/2007, at 11:46 AM, [EMAIL PROTECTED] wrote: > > Hi everyone, > > Is it possible to use Propel with database functions? i.e. I want to > do the following: > > SELECT * FROM table WHERE LCASE(field) = ? > > And this is what I've got so far: > > $c = new Criteria(); > $c->add(TablePeer::FIELD, $value); > return TablePeer::doSelect($c); > > How can I get it to accept LCASE on the DB? Is this even possible? > > Thanks, > Jevon > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" 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/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
