Hi daareck

Check out the Cake manual (http://manual.cakephp.org/chapter/models) and 
look for the section titled: Complex Find Conditions (using arrays)

It has a good description of how to compose an array of conditions that 
will do what you want.

Regards,
Langdon


daareck wrote:
> Hello
> 
> I need some help in making an OR clause in $criteria array. I'd like
> to have two conditions on one field. It should look like:
> ... WHERE((AuctionShippers.shipper_id='5' OR
> AuctionShippers.shipper_id='-1') AND(..[some other conditions]..))
> 
> $criteria['Auction.created'] = $this->data['Auction']['created'];
> $criteria['Shipping.name'] = 'LIKE %'.$this->data['Shipping']
> ['name'].'%';
> $criteria +=
> array('AuctionsShipper.shipper_id'=>'-1','AuctionsShipper.shipper_id'=>
> $shipper[0]['Shipper']['id']);
> 
> this code doesn't work :(
> 
> 
> > 

-- 
--
Linden Row Pty Ltd

NSW      : +61 2 8215 0570
Victoria : +61 3 9013 9423
Fax      : +61 2 8215 0571

Mobile   : +61 416 118 037

http://www.lindenrow.com.au

---------------------------
Buy fine chocolate online
http://www.chocolatereview.com.au

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