notifications - How can I use MySQL alias in Where condition -


i have column date of months in table,
table_date
17
13
12
04
check these date lesser current date
trying, or there other better way.

select concat(date_format(now(),'%y-%m'),'-',table_date) duedate dhr due date < curdate()
have error as
unknown column 'duedate' in 'where clause'

i found concatenating must done in condition

select table_date table_name concat(date_format(now(),'%y-%m'),'-',table_date) < curdate()


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -