neverdie Posted May 25, 2008 at 05:42 PM Report Share #187402 Posted May 25, 2008 at 05:42 PM 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 at 05:45 PM Report Share #187403 Posted May 25, 2008 at 05:45 PM 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 at 01:06 PM Author Report Share #187559 Posted May 26, 2008 at 01:06 PM 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