I am working with doctrine querybuilder and I need to include ->addOrderBy()
within my query,
So initly I had this
$qb->addOrderBy('a.weighting', 'DESC');
which worked fine but did not bring desired results, I went back to the drawing board and created new query and the order by
part should look like this:
order by DATE_FORMAT(published_at, '%Y/%m/%d') DESC
I tried to translate this into Doctrine queryBuilder but it does not work I probably doing something wrong:
My translated order by QUery Part:
$qb->addOrderBy('DATE_FORMAT(a.published_at, %Y/%m/%d)', 'DESC');
I tried Google for answers, went on to Doctrine web site : Doctrine Site
But still no luck