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

C# random value from dictionary and tuple -

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

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -