Dear friends,
see the Following query -----
[code=mysql]
SELECT headline, Concat(EXTRACT( YEAR FROM datetime),'-',EXTRACT(MONTH FROM datetime),'-',DAYOFMONTH(da tetime)) as abc FROM news_news where catid='1' and abc>='2007-10-1' and abc<='2007-10-30'[/code]
here abc is a temp variable can i use it in where clause in same query ?????
here i excute this but it give
#1054 - Unknown column 'abc' in 'where clause'
plz tell me anyone is it possible or not ????
see the Following query -----
[code=mysql]
SELECT headline, Concat(EXTRACT( YEAR FROM datetime),'-',EXTRACT(MONTH FROM datetime),'-',DAYOFMONTH(da tetime)) as abc FROM news_news where catid='1' and abc>='2007-10-1' and abc<='2007-10-30'[/code]
here abc is a temp variable can i use it in where clause in same query ?????
here i excute this but it give
#1054 - Unknown column 'abc' in 'where clause'
plz tell me anyone is it possible or not ????
Comment