SORU
21 AĞUSTOS 2012, Salı


Nasıl symfony2 içinde findBY fonksiyonu ile Doktrinde OrderBy kullanmak

Kullandığımda bu fonksiyon

$ens = $em->getRepository('AcmeBinBundle:Marks')->findBy(array('type'=> 'C12'));

Ama sipariş asceding sonuçları istiyorum

CEVAP
21 AĞUSTOS 2012, Salı


findBy ikinci parametre SİPARİŞİ için.

$ens = $em->getRepository('AcmeBinBundle:Marks')
          ->findBy(
             array('type'=> 'C12'), 
             array('id' => 'ASC')
           );

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • George McCarron

    George McCar

    29 Mayıs 2013
  • parlophone

    parlophone

    28 ŞUBAT 2006
  • Tek Syndicate

    Tek Syndicat

    23 Temmuz 2008