1
How do I recover users recorded in a database table by the dt_birth field through two values representing the minimum and maximum age of the users that will be returned, the minimum and maximum age does not always come together can-if you specify only the minimum age, or only the maximum age. Is subquery necessary? Note: the database is mysql.
Basically this would be the query (where 18 and 30 are the age limits) the date of birth this in the American format YYYY/MM/DD the Where clause is just an example, it does not work.
SELECT nome, dt_nascimento FROM usuario WHERE dt_nascimento > 18 AND dt_nascimento < 30;
You can put an example of the table structure and what result you want to get?
– bruno