Jump to content

[SOLVED] sum fields in where clause


AlexanderTheGr

Recommended Posts

Yeah, you cannot refer to an alias in the WHERE clause. Not entirely sure why.

Because WHERE is executed BEFORE select, so it does'nt know aliases at the time. You have to repeat the expression if you have some.

Anyway, in this case it was wrong at all to put the condition in the WHERE clause, even repeating the expression, because you can't test a condition on a grouped value in WHERE.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.