Hi.

WHERE statement is not applicable to calculated columns. Use HAVING instead.

2010/3/10 miguelSantirso <[email protected]>

> Hi, I have a starts_at field that keeps the date in which certain event
> starts or has started (in UNIX seconds). Also, I have a minutes_long field.
> I need to filter all the objects that are already finished and I tried
> adding the following to my original query:
>
> $q->addSelect('c.starts_at + c.minutes_long*60 AS finishes_at');
> $q->addWhere("finishes_at >= ?", time());
>
> However, Doctrine doesn't seem to recognise "finishes_at" in the "addWhere"
> statement. I don't know if this is the expected behavior of Doctrine. If so,
> how could I write an equivalent query?
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<symfony-users%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
With the best regards, Andrei.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to