Jump to content

Lazarus99

New Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by Lazarus99

  1. Perfect, Thank you very much, that worked great for me.
  2. I have an array in php bobby, kevin, bill, kevin, brian, bobby, bobby I am trying to anonymise these into a new array. bidder1, bidder2, bidder3, bidder2, bidder4, bidder1, bidder1 I have tried searching the array and try to keep track of the key then piece it back together but I know there is an easier way. Thanks in advance
  3. Thanks for checking that out!
  4. It's OK, I posted it on reddit and a guy came back with this and it worked a treat. case 'price_asc': $select->order(new Expr("IF(l.listing_type='auction', IF(max(b.amount) is null, l.start_price, max(b.amount)), CASE l.buyout_price WHEN 0 THEN ~0 ELSE l.buyout_price END) ASC")); break; Cheers
  5. Hi, Thanks for replying! I have tried using l.buyout_price = 0 in the above snippet but it give weird ordering results Original case 'price_asc': $select->order(new Expr("IF(l.listing_type='auction', IF(max(b.amount) is null, l.start_price, max(b.amount)), l.buyout_price) ASC")); break; Tried case 'price_asc': $select->order(new Expr("IF(l.listing_type='auction', IF(max(b.amount) is null, l.start_price, max(b.amount)), l.buyout_price = 0 ) ASC")); break;
  6. Hi, all I have the below snippet of code, But specifically about the l.buyout_price bit at the end. I want to have 0 values at the end of the ordering. Does anyone have any idea on how to rewrite the below code to achieve this. Example or ordering I would like l.buyout_price to be in this order: 1,12,200,0 instead of 0,1,12,200 case 'price_asc': $select->order(new Expr("IF(l.listing_type='auction', IF(max(b.amount) is null, l.start_price, max(b.amount)), l.buyout_price) ASC")); break;
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.