I will give that a spin thanks. I wasn't sure if that would actually work as PHP's negation operator is in fact ! ... but I'll try both. GOt a little side tracked after I sent the original post with another problem
On Wed, Apr 29, 2009 at 11:28 PM, Konrad <[email protected]> wrote: > > Hi. > Maybe php negation operator will help you. > > $status_criterion->addAnd($c->getNewCriterion > (MailDetailsPeer::CLASSIFICATION, ~2 , Criteria::BINARY_AND)); > > Have a nice day > > On 29 Kwi, 10:09, Gareth McCumskey <[email protected]> wrote: > > Hi all, > > > > I need the great minds that populate this liust to assist me with a small > > dilema. We currently use an integer field that stores a range of values > as a > > bitwise number depending on certain criteria of an item stored in the db. > > What we want to do now is write a sql query like: > > > > SELECT [columns] FROM [tablename] WHERE classification & 1 AND > > classification & ~2 > > > > I am struggling to find the negation (~) operator as part of the criteria > > syntax. So far I have: > > > > $status_criterion = $c->getNewCriterion(MailDetailsPeer::CLASSIFICATION, > 1, > > Criteria::BINARY_AND); > > > $status_criterion->addAnd($c->getNewCriterion(MailDetailsPeer::CLASSIFICATION, > > 2 , Criteria::BINARY_AND)); > > > > As you can see I have no negation on the second-line because I do not > know > > how I should do that. There aren't any obvious options as part of Propel. > > > > ANy help would be appreciated guys :) > > > > -- > > Gareth McCumskeyhttp://garethmccumskey.blogspot.com > > twitter: @garethmcc > > > -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
