Help for this page

Select Code to Download


  1. or download this
    my $count = Core::Models->resultset('Shipment')->search(
      undef
    )->count();
    
  2. or download this
    my $count = Core::Models->resultset('Shipment')->search(
      { 'rma.id' => {'!=' => undef} },
      { prefetch => 'rma' }
    )->count();
    
  3. or download this
    SELECT COUNT( * ) FROM (SELECT me.id FROM shipment me LEFT JOIN rma rm
    +a ON ( rma.shipment_reference =  me.ref AND rma.merchant_id = me.api_
    +merchant_id ) WHERE ( rma.id IS NOT NULL ) GROUP BY me.id) me