Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save e-vural/d97ef560ceed64372a72 to your computer and use it in GitHub Desktop.
Save e-vural/d97ef560ceed64372a72 to your computer and use it in GitHub Desktop.
$date = new \DateTime('now'); // today (bugün)
$dogum_gunleri = $em->createQueryBuilder()
->select('p')
->from('CoreCommonBundle:YourEntity','p')
->where('p.school=:school')
->andWhere('p.birthday LIKE :birthday')// LIKE important
->setParameter('okul',$okul)
->setParameter('birthday', '%'.$date->format('m-d').'%')//this is important format must be (m-d) and must be %
//format (m-d) olmalı ve yüzde işaretleri kesin olmalı
->getQuery()
->getResult();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment