Hey all,
Im trying to get the age from a table and search on it.
i have this:
SELECT CURRENT_DATE, (YEAR(CURRENT_DATE)-YEAR(t2.star_geboortedatum)) - (RIGHT(CURRENT_DATE,5)<RIGHT(t2.star_geboortedatum,5)) AS age,
t1.star_usernaam, t1.star_id, t2.star_naam, t2.star_geboortedatum FROM cs_login AS t1, cs_details AS t2 WHERE t1.star_usernaam LIKE '%' && t2.star_naam LIKE 'd%' && t2.star_woonplaats
LIKE '%' && age='18' && t1.star_id=t2.star_id
The query is ok but im getting a error: unknown column age in WHERE clue.
Does some1 knows what im doing wrong?