I've been looking for hours to get the right syntax for the doctrine query builder. I need to get the oldest value in the DB.
colums:
id, dateCreated, value
query: (that doesn't works)
->select('c')
->where(
$qb->expr()->eq('c.dateCreated', $qb->expr()->min('c.dateCreated'))
)
can someone tells me how to build the right query for my need please. Thanks guys!
dateCreatedwith addition of limiting to 1 result and you should be good to go.