neverdie Posted May 25, 2008 Report Share Posted May 25, 2008 Boas! A minha questao é a seguinte: tenho duas tabelas tabela 1 - mysql> desc convites_homem; +-----------------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------------+-------------+------+-----+---------+-------+ | login_convida | varchar(25) | NO | | | | | login_convidado | varchar(25) | NO | | | | | data | datetime | NO | | | | +-----------------+-------------+------+-----+---------+-------+ 3 rows in set (0.00 sec) tabela 2 - mysql> desc convites_mulher; +-----------------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------------+-------------+------+-----+---------+-------+ | login_convida | varchar(25) | NO | | | | | login_convidado | varchar(25) | NO | | | | | data | datetime | NO | | | | +-----------------+-------------+------+-----+---------+-------+ 3 rows in set (0.00 sec) O que eu presiso de fazer é um select entre as duas tablas e que me ordene o resultado pela data, Alguem sabe como fazer a query? Cumprimentos Marco Link to comment Share on other sites More sharing options...
Rui Carlos Posted May 25, 2008 Report Share Posted May 25, 2008 Com o UNION consegues juntar as duas tabelas. Depois fazes como farias para uma só tabela. Rui Carlos Gonçalves Link to comment Share on other sites More sharing options...
neverdie Posted May 26, 2008 Author Report Share Posted May 26, 2008 ok! Obrigado Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now