Re: [GENERAL] error with Subquery

2006-12-08 Thread Ragnar
On fös, 2006-12-08 at 13:58 +0300, Max Bondaruk wrote: > Hi! > > error with Subquery alias... > SELECT *,(SELECT COUNT(id) > FROM articles a WHERE a.lft < articles.lft AND a.rgt > articles.rgt) AS depth > FROM articles > where (depth < 3) > ORDER BY lft you cannot refer to depth in the where bec

[GENERAL] error with Subquery

2006-12-08 Thread Max Bondaruk
Hi! error with Subquery alias... help... SELECT *,(SELECT COUNT(id) FROM articles a WHERE a.lft < articles.lft AND a.rgt > articles.rgt) AS depth FROM articles where (depth < 3) ORDER BY lft Max mailto:[EMAIL PROTECTED] ---(end of broadcast)-